Skip to content

Commit

Permalink
Ignore warnings when deleting ECTAG
Browse files Browse the repository at this point in the history
Signed-off-by: Tim Crawford <[email protected]>
  • Loading branch information
crawfxrd authored and jackpot51 committed Nov 11, 2024
1 parent c5c68b7 commit 1a37d68
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions src/app/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -224,16 +224,15 @@ fn inner() -> Result<()> {
} else {
let c = if let Ok((_, ectag)) = find(ECTAG) {
// Attempt to remove EC tag
match (ectag.0.Delete)(ectag.0) {
Status::SUCCESS => {
println!("EC tag: deleted successfully");
let status = (ectag.0.Delete)(ectag.0);
// XXX: Match previous behavior, which ignored warnings.
if !status.is_error() {
println!("EC tag: deleted successfully");

// Have to prevent Close from being called after Delete
mem::forget(ectag);
}
err => {
println!("EC tag: failed to delete: {}", err);
}
// Have to prevent Close from being called after Delete
mem::forget(ectag);
} else {
println!("EC tag: failed to delete: {}", status);
}

// Skip enter if system76 ec flashing already occured
Expand Down

0 comments on commit 1a37d68

Please sign in to comment.