Merge "fs_mgr: Allow commas in boot device paths." am: f9459a45eb
am: e64cc297b6
Change-Id: I62b37c4aca11ce28864a5b5a55ed3937fff659d7
This commit is contained in:
commit
99223931a3
1 changed files with 14 additions and 0 deletions
|
@ -824,6 +824,20 @@ std::set<std::string> GetBootDevices() {
|
|||
return std::set<std::string>(boot_devices.begin(), boot_devices.end());
|
||||
}
|
||||
|
||||
std::string cmdline;
|
||||
if (android::base::ReadFileToString("/proc/cmdline", &cmdline)) {
|
||||
std::set<std::string> boot_devices;
|
||||
const std::string cmdline_key = "androidboot.boot_device";
|
||||
for (const auto& [key, value] : fs_mgr_parse_boot_config(cmdline)) {
|
||||
if (key == cmdline_key) {
|
||||
boot_devices.emplace(value);
|
||||
}
|
||||
}
|
||||
if (!boot_devices.empty()) {
|
||||
return boot_devices;
|
||||
}
|
||||
}
|
||||
|
||||
// Fallback to extract boot devices from fstab.
|
||||
Fstab fstab;
|
||||
if (!ReadDefaultFstab(&fstab)) {
|
||||
|
|
Loading…
Reference in a new issue