Make grub-install check for errors from efibootmgr
authorSteve McIntyre <steve@einval.com>
Wed, 31 Jan 2018 21:49:36 +0000 (21:49 +0000)
committerDaniel Kiper <daniel.kiper@oracle.com>
Wed, 14 Feb 2018 17:02:01 +0000 (18:02 +0100)
commit6400613ad0b463abc93362086a491cd2a5e99b0d
tree5840f16ddbca2662879070fe4da65ae250f13bce
parentd85c76b501edda038b68bc23eee946e6cc600513
Make grub-install check for errors from efibootmgr

Code is currently ignoring errors from efibootmgr, giving users
clearly bogus output like:

        Setting up grub-efi-amd64 (2.02~beta3-4) ...
        Installing for x86_64-efi platform.
        Could not delete variable: No space left on device
        Could not prepare Boot variable: No space left on device
        Installation finished. No error reported.

and then potentially unbootable systems. If efibootmgr fails, grub-install
should know that and report it!

We've been using similar patch in Debian now for some time, with no ill effects.

Signed-off-by: Steve McIntyre <93sam@debian.org>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
grub-core/osdep/unix/platform.c
include/grub/util/install.h
util/grub-install.c