Hello!

Commit 6400613ad0b463abc93362086a491cd2a5e99b0d introduced an
uninitialized variable that could lead ‘grub-install’ to error out when
it shouldn’t (I’ve experienced it on AArch64 where
‘grub_install_remove_efi_entries_by_distributor’ didn't have any entry
to remove):

  grub-install: error: efibootmgr failed to register the boot entry: Unknown 
error 65535.

The patch below solves this.

Thanks,
Ludo’.

--- grub-2.02/grub-core/osdep/unix/platform.c	2018-10-17 22:21:53.015284846 +0200
+++ grub-2.02/grub-core/osdep/unix/platform.c	2018-10-17 22:21:55.595271222 +0200
@@ -85,7 +85,7 @@ grub_install_remove_efi_entries_by_distr
   pid_t pid = grub_util_exec_pipe ((const char * []){ "efibootmgr", NULL }, &fd);
   char *line = NULL;
   size_t len = 0;
-  int rc;
+  int rc = 0;
 
   if (!pid)
     {

_______________________________________________
Bug-grub mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-grub

Reply via email to