userspace: remove vendor_boot selection logic
- Only patch it when user actively selects vendor_boot.
This commit is contained in:
@@ -690,10 +690,7 @@ pub fn choose_boot_partition(
|
|||||||
) -> String {
|
) -> String {
|
||||||
let slot_suffix = get_slot_suffix(false);
|
let slot_suffix = get_slot_suffix(false);
|
||||||
let skip_init_boot = kmi.starts_with("android12-");
|
let skip_init_boot = kmi.starts_with("android12-");
|
||||||
|
|
||||||
let init_boot_exist = Path::new(&format!("/dev/block/by-name/init_boot{slot_suffix}")).exists();
|
let init_boot_exist = Path::new(&format!("/dev/block/by-name/init_boot{slot_suffix}")).exists();
|
||||||
let vendor_boot_exist =
|
|
||||||
Path::new(&format!("/dev/block/by-name/vendor_boot{slot_suffix}")).exists();
|
|
||||||
|
|
||||||
// if specific partition is specified, use it
|
// if specific partition is specified, use it
|
||||||
if let Some(part) = partition {
|
if let Some(part) = partition {
|
||||||
@@ -708,11 +705,6 @@ pub fn choose_boot_partition(
|
|||||||
return "init_boot".to_string();
|
return "init_boot".to_string();
|
||||||
}
|
}
|
||||||
|
|
||||||
// if vendor_boot exists and not skipping it, use it
|
|
||||||
if !is_replace_kernel && vendor_boot_exist && !skip_init_boot {
|
|
||||||
return "vendor_boot".to_string();
|
|
||||||
}
|
|
||||||
|
|
||||||
"boot".to_string()
|
"boot".to_string()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user