Rename rules to preinit

It is possible that we will allow more preinit files for modules.
Rename the partition and folders from rules to preinit.
This commit is contained in:
topjohnwu
2023-03-16 04:07:00 -07:00
committed by John Wu
parent 7048aa1014
commit 4e2b88b3d0
18 changed files with 110 additions and 118 deletions

View File

@@ -122,7 +122,6 @@ int magisk_main(int argc, char *argv[]) {
do_reboot = 1;
} else {
usage();
exit(1);
}
int fd = connect_daemon(MainRequest::REMOVE_MODULES);
write_int(fd, do_reboot);
@@ -134,8 +133,8 @@ int magisk_main(int argc, char *argv[]) {
return 0;
} else if (argc >= 3 && argv[1] == "--install-module"sv) {
install_module(argv[2]);
} else if (argv[1] == "--rules-device"sv) {
auto dev = find_rules_device();
} else if (argv[1] == "--preinit-device"sv) {
auto dev = find_preinit_device();
if (dev) printf("%u:%u\n", major(dev), minor(dev));
return dev ? 0 : 1;
}