You've already forked Magisk
mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-09-06 06:36:58 +00:00
Move BootConfig to rust
This commit is contained in:
@@ -60,10 +60,10 @@ void MagiskInit::collect_devices() {
|
||||
strscpy(dev.dmname, name.data(), sizeof(dev.dmname));
|
||||
}
|
||||
if (auto it = std::ranges::find_if(config.partition_map, [&](const auto &i) {
|
||||
return i.first == dev.devname;
|
||||
return i.key == dev.devname;
|
||||
}); dev.partname[0] == '\0' && it != config.partition_map.end()) {
|
||||
// use androidboot.partition_map as partname fallback.
|
||||
strscpy(dev.partname, it->second.data(), sizeof(dev.partname));
|
||||
strscpy(dev.partname, it->value.data(), sizeof(dev.partname));
|
||||
}
|
||||
sprintf(path, "/sys/dev/block/%s", entry->d_name);
|
||||
xrealpath(path, dev.devpath, sizeof(dev.devpath));
|
||||
@@ -163,7 +163,7 @@ bool MagiskInit::mount_system_root() {
|
||||
|
||||
// Try normal partname
|
||||
char sys_part[32];
|
||||
sprintf(sys_part, "system%s", config.slot);
|
||||
sprintf(sys_part, "system%s", config.slot.data());
|
||||
dev = find_block(sys_part);
|
||||
if (dev > 0)
|
||||
goto mount_root;
|
||||
|
||||
Reference in New Issue
Block a user