Date: Tue, 16 Jun 2020 20:38:56 +0000 (UTC) From: Emmanuel Vadot <manu@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362242 - stable/12/usr.sbin/efibootmgr Message-ID: <202006162038.05GKcuPM057736@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: manu Date: Tue Jun 16 20:38:55 2020 New Revision: 362242 URL: https://svnweb.freebsd.org/changeset/base/362242 Log: MFC r347441: 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 Modified: stable/12/usr.sbin/efibootmgr/efibootmgr.c Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.sbin/efibootmgr/efibootmgr.c ============================================================================== --- stable/12/usr.sbin/efibootmgr/efibootmgr.c Tue Jun 16 20:36:22 2020 (r362241) +++ stable/12/usr.sbin/efibootmgr/efibootmgr.c Tue Jun 16 20:38:55 2020 (r362242) @@ -673,7 +673,7 @@ make_boot_var(const char *label, const char *loader, 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) { @@ -684,7 +684,8 @@ make_boot_var(const char *label, const char *loader, 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");
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202006162038.05GKcuPM057736>