Skip to content

Commit

Permalink
efibootmgr: delete_bootnext is just a boolean, not an entry id
Browse files Browse the repository at this point in the history
When deleting bootnext, there's nothing to validate (other than
the variable existing, in which case del will fail as expected).

This appears to be a copy/paste error when adding the delete-bootnext
option from the [create] bootnext option.

Signed-off-by: Dima Zavin <dmitriyz@waymo.com>
  • Loading branch information
dimaz-waymo committed Jan 8, 2024
1 parent 4a8d9c6 commit 9118e14
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/efibootmgr.c
Original file line number Diff line number Diff line change
Expand Up @@ -1927,10 +1927,6 @@ main(int argc, char **argv)
}

if (opts.delete_bootnext) {
if (!is_current_entry(opts.delete_bootnext))
errorx(17, "Boot entry %04X does not exist",
opts.delete_bootnext);

ret = efi_del_variable(EFI_GLOBAL_GUID, "BootNext");
if (ret < 0)
error(10, "Could not delete BootNext");
Expand Down

0 comments on commit 9118e14

Please sign in to comment.