efiloader: don't execute hooks when setting currdev/loaddev
We still need to set the hooks to prevent improper manipulations thereafter at the loader prompt, but as it is we're actively preventing loaddev from being set correctly in some circumstances (ZFS in particular) and doing more work than needed with currdev -- that hook in particular validates it as a correct device, which we can assume isn't needed in this context. Reviewed by: imp, sigsys@gmail.com Submitted/Diagnosed by: sigsys@gmail.com Differential Revision: https://reviews.freebsd.org/D23390
This commit is contained in:
parent
6c4a4f1bc2
commit
6b197e58f6
@ -180,8 +180,17 @@ static void
|
||||
set_currdev(const char *devname)
|
||||
{
|
||||
|
||||
env_setenv("currdev", EV_VOLATILE, devname, efi_setcurrdev, env_nounset);
|
||||
env_setenv("loaddev", EV_VOLATILE, devname, env_noset, env_nounset);
|
||||
/*
|
||||
* Don't execute hooks here; we may need to try setting these more than
|
||||
* once here if we're probing for the ZFS pool we're supposed to boot.
|
||||
* The currdev hook is intended to just validate user input anyways,
|
||||
* while the loaddev hook makes it immutable once we've determined what
|
||||
* the proper currdev is.
|
||||
*/
|
||||
env_setenv("currdev", EV_VOLATILE | EV_NOHOOK, devname, efi_setcurrdev,
|
||||
env_nounset);
|
||||
env_setenv("loaddev", EV_VOLATILE | EV_NOHOOK, devname, env_noset,
|
||||
env_nounset);
|
||||
}
|
||||
|
||||
static void
|
||||
|
Loading…
Reference in New Issue
Block a user