efibootmgr: Check for efi supported after parsing args

Move the check for efi variables being supported to after parsing the args. This
allows '-h' to produce both as a normal user as well as on all systems.
This commit is contained in:
Warner Losh 2021-02-11 16:06:30 -07:00
parent 145bf6c0af
commit 7fe2f504f8

View File

@ -1072,11 +1072,12 @@ int
main(int argc, char *argv[])
{
memset(&opts, 0, sizeof (bmgr_opts_t));
parse_args(argc, argv);
if (!efi_variables_supported())
errx(1, "efi variables not supported on this system. root? kldload efirt?");
memset(&opts, 0, sizeof (bmgr_opts_t));
parse_args(argc, argv);
read_vars();
if (opts.create)