Implement reboot in Rust

This commit is contained in:
topjohnwu
2025-04-28 17:22:14 -07:00
committed by John Wu
parent d1829308e9
commit 22884e173a
3 changed files with 11 additions and 14 deletions
-7
View File
@@ -128,13 +128,6 @@ static void poll_ctrl_handler(pollfd *pfd) {
}
}
void MagiskD::reboot() const noexcept {
if (is_recovery())
exec_command_sync("/system/bin/reboot", "recovery");
else
exec_command_sync("/system/bin/reboot");
}
bool get_client_cred(int fd, sock_cred *cred) {
socklen_t len = sizeof(ucred);
if (getsockopt(fd, SOL_SOCKET, SO_PEERCRED, cred, &len) != 0)