]> git.ipfire.org Git - thirdparty/grub.git/commit
commands/efi/efifwsetup: Print an error if boot to firmware setup is not supported
authorJavier Martinez Canillas <javierm@redhat.com>
Thu, 18 Aug 2022 17:50:12 +0000 (13:50 -0400)
committerDaniel Kiper <daniel.kiper@oracle.com>
Fri, 19 Aug 2022 22:23:18 +0000 (00:23 +0200)
commit1e79bbfbda24a08cb856ff30f8b1bec460779b91
tree535c68cfcc39aed8f49efc4b199f75df50f95dfa
parent0eb684e8bfb0a9d2d42017a354740be25947babe
commands/efi/efifwsetup: Print an error if boot to firmware setup is not supported

The "fwsetup" command is only registered if the firmware supports booting
to the firmware setup UI. But it could be possible that the GRUB config
already contains a "fwsetup" entry, because it was generated in a machine
that has support for this feature.

To prevent users getting an error like:

    error: ../../grub-core/script/function.c:109:can't find command `fwsetup'.

if it is not supported by the firmware, let's just always register the
command but print a more accurate message if the firmware doesn't
support this option.

Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
grub-core/commands/efi/efifwsetup.c