mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-12-10 06:51:55 +00:00
Refactor daemon connection
This commit is contained in:
@@ -159,10 +159,7 @@ int su_client_main(int argc, char *argv[]) {
|
||||
int ptmx, fd;
|
||||
|
||||
// Connect to client
|
||||
fd = connect_daemon();
|
||||
|
||||
// Tell the daemon we are su
|
||||
write_int(fd, SUPERUSER);
|
||||
fd = connect_daemon(DaemonRequest::SUPERUSER);
|
||||
|
||||
// Send su_request
|
||||
xwrite(fd, &su_req, sizeof(su_req_base));
|
||||
|
||||
Reference in New Issue
Block a user