Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
weblate committed Jan 18, 2024
2 parents b2e353e + 2fec279 commit d7fdc92
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions userspace/ksud/src/boot_patch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,9 @@ pub fn patch(
ensure_gki_kernel()?;
}

if kernel.is_some() {
let is_replace_kernel = kernel.is_some();

if is_replace_kernel {
ensure!(
init.is_none() && kmod.is_none(),
"init and module must not be specified."
Expand Down Expand Up @@ -101,7 +103,7 @@ pub fn patch(

let init_boot_exist =
Path::new(&format!("/dev/block/by-name/init_boot{slot_suffix}")).exists();
let boot_partition = if init_boot_exist {
let boot_partition = if !is_replace_kernel && init_boot_exist {
format!("/dev/block/by-name/init_boot{slot_suffix}")
} else {
format!("/dev/block/by-name/boot{slot_suffix}")
Expand Down

0 comments on commit d7fdc92

Please sign in to comment.