guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/02: gnu: grub-efi: Fix an uninitialized variable issue.


From: Ludovic Courtès
Subject: 01/02: gnu: grub-efi: Fix an uninitialized variable issue.
Date: Thu, 18 Oct 2018 18:11:53 -0400 (EDT)

civodul pushed a commit to branch master
in repository guix.

commit d36cd888734da3c9d7ce27dafedb00f0e42a636e
Author: Ludovic Courtès <address@hidden>
Date:   Thu Oct 18 23:56:47 2018 +0200

    gnu: grub-efi: Fix an uninitialized variable issue.
    
    * gnu/packages/patches/grub-check-error-efibootmgr.patch: Add hunk to
    correct uninitialized variable.
---
 .../patches/grub-check-error-efibootmgr.patch      | 23 +++++++++++++++++++++-
 1 file changed, 22 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/patches/grub-check-error-efibootmgr.patch 
b/gnu/packages/patches/grub-check-error-efibootmgr.patch
index b2fd160..efeb20f 100644
--- a/gnu/packages/patches/grub-check-error-efibootmgr.patch
+++ b/gnu/packages/patches/grub-check-error-efibootmgr.patch
@@ -160,7 +160,7 @@ index 5e4cdfd..690f180 100644
  
          /* Try to make this image bootable using the EFI Boot Manager, if 
available.  */
          if (!efi_distributor || efi_distributor[0] == '\0')
-@@ -1887,8 +1892,11 @@ main (int argc, char *argv[])
+@@ -1887,7 +1892,10 @@ main (int argc, char *argv[])
                          efidir_grub_dev->disk->name,
                          (part ? ",": ""), (part ? : ""));
          grub_free (part);
@@ -173,4 +173,25 @@ index 5e4cdfd..690f180 100644
 +                           strerror (ret));
        }
        break;
+
+
+Below is a followup to the patch above: the uninitialized variable could lead
+‘grub-install’ to error out when it shouldn’t (seen on an AArch64 box 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.
+
+See <http://lists.gnu.org/archive/html/bug-grub/2018-10/msg00006.html>.
+
+--- 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)
+     {



reply via email to

[Prev in Thread] Current Thread [Next in Thread]