mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-04-20 19:01:27 +00:00
parent
7357a35f8d
commit
52ba6d11bc
@ -447,13 +447,13 @@ int connect_daemon(int req, bool create) {
|
|||||||
break;
|
break;
|
||||||
case MainResponse::ERROR:
|
case MainResponse::ERROR:
|
||||||
LOGE("Daemon error\n");
|
LOGE("Daemon error\n");
|
||||||
exit(-1);
|
return -1;
|
||||||
case MainResponse::ROOT_REQUIRED:
|
case MainResponse::ROOT_REQUIRED:
|
||||||
LOGE("Root is required for this operation\n");
|
LOGE("Root is required for this operation\n");
|
||||||
exit(-1);
|
return -1;
|
||||||
case MainResponse::ACCESS_DENIED:
|
case MainResponse::ACCESS_DENIED:
|
||||||
LOGE("Access denied\n");
|
LOGE("Access denied\n");
|
||||||
exit(-1);
|
return -1;
|
||||||
default:
|
default:
|
||||||
__builtin_unreachable();
|
__builtin_unreachable();
|
||||||
}
|
}
|
||||||
|
@ -59,6 +59,7 @@ int remote_request_unmount();
|
|||||||
|
|
||||||
inline int zygisk_request(int req) {
|
inline int zygisk_request(int req) {
|
||||||
int fd = connect_daemon(MainRequest::ZYGISK);
|
int fd = connect_daemon(MainRequest::ZYGISK);
|
||||||
|
if (fd < 0) return fd;
|
||||||
write_int(fd, req);
|
write_int(fd, req);
|
||||||
return fd;
|
return fd;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user