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

@@ -185,7 +185,7 @@ static void extract_files(bool sbin) {
void MagiskInit::parse_config_file() {
dev_t dev = 0;
parse_prop_file("/data/.backup/.magisk", [&dev](auto key, auto value) -> bool {
if (key == "RULESDEVICE") {
if (key == "PREINITDEVICE") {
unsigned int dev_major = 0;
unsigned int dev_minor = 0;
sscanf(value.data(), "%u:%u", &dev_major, &dev_minor);
@@ -194,7 +194,7 @@ void MagiskInit::parse_config_file() {
}
return true;
});
rules_dev = dev;
preinit_dev = dev;
}
#define ROOTMIR MIRRDIR "/system_root"