Skip to content

Commit 71fd7f8

Browse files
committed
fix cpp error
1 parent 1e45772 commit 71fd7f8

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

app/src/main/jni/include/kernelsu/ksu.hpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,6 @@
2424
#define CMD_IS_SU_ENABLED 14
2525
#define CMD_ENABLE_SU 15
2626

27-
static bool ksuctl(int cmd, void* arg1, void* arg2) {
28-
int32_t result = 0;
29-
prctl(KERNEL_SU_OPTION, cmd, arg1, arg2, &result);
30-
return result == KERNEL_SU_OPTION;
31-
}
32-
3327
bool grant_root();
3428

3529
bool become_manager(const char *);

app/src/main/jni/kernelsu/ksu.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@
66
#include <kernelsu/ksu.hpp>
77
#include <logging.hpp>
88

9+
static bool ksuctl(int cmd, void* arg1, void* arg2) {
10+
int32_t result = 0;
11+
prctl(KERNEL_SU_OPTION, cmd, arg1, arg2, &result);
12+
return result == KERNEL_SU_OPTION;
13+
}
14+
915
bool grant_root() {
1016
return ksuctl(CMD_GRANT_ROOT, nullptr, nullptr);
1117
}

0 commit comments

Comments
 (0)