stand/loader.efi: read zfs bootonce attribute before checking currdev
authorGleb Smirnoff <glebius@FreeBSD.org>
Thu, 8 Jun 2023 18:14:45 +0000 (11:14 -0700)
committerGleb Smirnoff <glebius@FreeBSD.org>
Thu, 8 Jun 2023 18:14:45 +0000 (11:14 -0700)
commite3e2681d0ec28d6661fef6da76c9479049e2761c
tree4e9fb20659f3df638ae75c719bea95aa2a51c1fe
parentdfa1982352ee312079b42ea49adcbc1da15722f7
stand/loader.efi: read zfs bootonce attribute before checking currdev

First check if bootonce is configured and if it is, then change currdev
accordingly and after that do the sanity check.  This fixes boot in a
situation when ZFS pool doesn't have the "bootfs" property, but has
bootonce attribute set.  A strange, but legitimate case.

Reviewed by: tsoome, imp
Differential Revision: https://reviews.freebsd.org/D40388
stand/efi/loader/main.c