mirror of
https://github.com/tiann/KernelSU.git
synced 2025-02-20 11:43:32 +08:00
kernel: emit compile error when KPROBES disabled
This commit is contained in:
parent
04c2febe55
commit
be91d4edaf
10
kernel/ksu.c
10
kernel/ksu.c
@ -235,10 +235,14 @@ int kernelsu_init(void){
|
||||
ksu_allowlist_init();
|
||||
|
||||
rc = register_kprobe(&kp);
|
||||
if (rc) {
|
||||
pr_info("prctl kprobe failed: %d, please check your kernel config.\n", rc);
|
||||
return rc;
|
||||
}
|
||||
|
||||
enable_sucompat();
|
||||
|
||||
return rc;
|
||||
return 0;
|
||||
}
|
||||
|
||||
void kernelsu_exit(void){
|
||||
@ -251,6 +255,10 @@ void kernelsu_exit(void){
|
||||
module_init(kernelsu_init);
|
||||
module_exit(kernelsu_exit);
|
||||
|
||||
#ifndef CONFIG_KPROBES
|
||||
#error("`CONFIG_KPROBES` must be enabled for KernelSU!")
|
||||
#endif
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_AUTHOR("weishu");
|
||||
MODULE_DESCRIPTION("Android GKI KernelSU");
|
Loading…
x
Reference in New Issue
Block a user