kernel: Public ksu_handle_sys_reboot

- clean code
This commit is contained in:
ShirkNeko
2025-11-11 16:49:09 +08:00
parent ded31c2043
commit 7e595e1730
2 changed files with 3 additions and 2 deletions

View File

@@ -43,6 +43,7 @@ struct manager_list_info {
bool ksu_queue_work(struct work_struct *work);
#if 0
static inline int startswith(char *s, char *prefix)
{
return strncmp(s, prefix, strlen(prefix));
@@ -56,5 +57,6 @@ static inline int endswith(const char *s, const char *t)
return 1;
return strcmp(s + slen - tlen, t);
}
#endif
#endif

View File

@@ -742,8 +742,6 @@ static const struct ksu_ioctl_cmd_map ksu_ioctl_handlers[] = {
{ .cmd = 0, .name = NULL, .handler = NULL, .perm_check = NULL} // Sentine
};
#ifdef KSU_KPROBES_HOOK
struct ksu_install_fd_tw {
struct callback_head cb;
int __user *outp;
@@ -801,6 +799,7 @@ int ksu_handle_sys_reboot(int magic1, int magic2, unsigned int cmd, void __user
return 0;
}
#ifdef KSU_KPROBES_HOOK
// Reboot hook for installing fd
static int reboot_handler_pre(struct kprobe *p, struct pt_regs *regs)
{