mirror of
https://github.com/freebsd/freebsd-src
synced 2024-07-22 10:48:02 +00:00
efibootmgr: Do not add the new boot entry in dry-run is specified
While here fix a typo. Sponsored-by: Ampere Computing, LLC Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D20212
This commit is contained in:
parent
73f707e259
commit
67a5e53398
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=347441
|
@ -679,7 +679,7 @@ make_boot_var(const char *label, const char *loader, const char *kernel, const c
|
|||
lopt_size = create_loadopt(load_opt_buf, MAX_LOADOPT_LEN, load_attrs,
|
||||
dp, llen + klen, label, env, env ? strlen(env) + 1 : 0);
|
||||
if (lopt_size == BAD_LENGTH)
|
||||
errx(1, "Can't crate loadopt");
|
||||
errx(1, "Can't create loadopt");
|
||||
|
||||
ret = 0;
|
||||
if (!dry_run) {
|
||||
|
@ -690,7 +690,8 @@ make_boot_var(const char *label, const char *loader, const char *kernel, const c
|
|||
if (ret)
|
||||
err(1, "efi_set_variable");
|
||||
|
||||
add_to_boot_order(bootvar); /* first, still not active */
|
||||
if (!dry_run)
|
||||
add_to_boot_order(bootvar); /* first, still not active */
|
||||
new_ent = malloc(sizeof(struct entry));
|
||||
if (new_ent == NULL)
|
||||
err(1, "malloc");
|
||||
|
|
Loading…
Reference in a new issue