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 authored and vathpela committed Jan 23, 2024
1 parent af5b168 commit 0ca99d4
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 @@ -1928,10 +1928,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 0ca99d4

Please sign in to comment.