diff --git a/core/jni/magiskboot/ramdisk.c b/core/jni/magiskboot/ramdisk.c index 4d0fd4193..5dcfa4b34 100644 --- a/core/jni/magiskboot/ramdisk.c +++ b/core/jni/magiskboot/ramdisk.c @@ -80,7 +80,7 @@ int cpio_commands(const char *command, int argc, char *argv[]) { parse_cpio(&v, incpio); if (strcmp(command, "test") == 0) { - return cpio_test(&v); + exit(cpio_test(&v)); } else if (strcmp(command, "restore") == 0) { ret = cpio_restore(&v); } else if (strcmp(command, "stocksha1") == 0) { diff --git a/core/jni/utils/file.c b/core/jni/utils/file.c index f6027d915..e33d1c4e6 100644 --- a/core/jni/utils/file.c +++ b/core/jni/utils/file.c @@ -260,7 +260,7 @@ int getattrat(int dirfd, const char *pathname, struct file_attr *a) { } int fgetattr(int fd, struct file_attr *a) { -#ifndef NO_SELINUX +#ifdef SELINUX char path[PATH_MAX]; fd_getpath(fd, path, sizeof(path)); return getattr(path, a);