Remove unused code

This commit is contained in:
topjohnwu 2018-06-27 06:04:16 +08:00
parent 3283439fd4
commit 528634d755
2 changed files with 1 additions and 14 deletions

View File

@ -126,11 +126,6 @@ static void set_path(struct vector *v) {
vec_push_back(v, NULL);
}
static void uninstall_env(struct vector *v) {
vec_push_back(v, strdup("BOOTMODE=true"));
set_path(v);
}
/***********
* Scripts *
***********/
@ -500,7 +495,7 @@ void startup() {
}
// No uninstaller or core-only mode
if (access(UNINSTALLER, F_OK) != 0 && access(DISABLEFILE, F_OK) != 0) {
if (access(DISABLEFILE, F_OK) != 0) {
// Allocate buffer
buf = xmalloc(PATH_MAX);
buf2 = xmalloc(PATH_MAX);
@ -665,13 +660,6 @@ void startup() {
xsymlink(MIRRDIR "/bin/busybox", BBPATH "/busybox");
}
// uninstall
if (access(UNINSTALLER, F_OK) == 0) {
close(open(UNBLOCKFILE, O_RDONLY | O_CREAT));
exec_command(0, NULL, uninstall_env, "sh", UNINSTALLER, NULL);
return;
}
// Start post-fs-data mode
execl("/sbin/magisk", "magisk", "--post-fs-data", NULL);
}

View File

@ -17,7 +17,6 @@
#define LOGFILE "/cache/magisk.log"
#define UNBLOCKFILE "/dev/.magisk.unblock"
#define DISABLEFILE "/cache/.disable_magisk"
#define UNINSTALLER "/cache/magisk_uninstaller.sh"
#define MAGISKTMP "/sbin/.core"
#define MIRRDIR MAGISKTMP "/mirror"
#define BBPATH MAGISKTMP "/busybox"