Skip to content

Commit

Permalink
cli/ota: Fix incorrectly quoted output and clippy warning
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Gunnerson <[email protected]>
  • Loading branch information
chenxiaolong committed Apr 27, 2024
1 parent 905eb92 commit 5adff50
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions avbroot/src/cli/ota.rs
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ fn get_vbmeta_patch_order(
}

if !missing.is_empty() {
warn!("Partitions aren't protected by AVB: {:?}", joined(missing));
warn!("Partitions aren't protected by AVB: {}", joined(missing));
}

// Ensure that there's only a single root of trust. Otherwise, there could
Expand Down Expand Up @@ -493,9 +493,7 @@ fn update_security_descriptors(
/// Get the text before the first equal sign in the kernel command line if it is
/// not empty.
fn cmdline_prefix(cmdline: &str) -> Option<&str> {
let Some((prefix, _)) = cmdline.split_once('=') else {
return None;
};
let (prefix, _) = cmdline.split_once('=')?;
if prefix.is_empty() {
return None;
}
Expand Down Expand Up @@ -916,7 +914,7 @@ fn patch_ota_zip(
}

if !missing.is_empty() {
bail!("Missing entries in OTA zip: {:?}", joined(missing));
bail!("Missing entries in OTA zip: {}", joined(missing));
} else if !paths.contains(ota::PATH_METADATA) && !paths.contains(ota::PATH_METADATA_PB) {
bail!(
"Neither legacy nor protobuf OTA metadata files exist: {:?}, {:?}",
Expand Down

0 comments on commit 5adff50

Please sign in to comment.