Skip to contentSkip to conversation

Small fix in grub-setup

PATCH Applied Javier Martín 2 participants 2 messages Jun 30, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Small fix in grub-setup

Here goes a small fix to a grub-setup error that has driven /me crazy for the last 4 hours: in the recent split between core_path and core_path_dev, one occurrence of the former that should have been turned into the latter was not, thus making grub-setup spit lots of nonsensical (to me) "error: file not found" messages. I spent a big deal of time trying to debug the wrong piece of code, since I stubbornly thought that the error was in the "read-and-check" loop, while it really was later in the file... Sigh

The fix is so simple that I post it directly here. If a ChangeLog entry is necessary, I'd propose "complete core_path variable split" or something along that lines.

Index: util/i386/pc/grub-setup.c
===================================================================
RCS file: /sources/grub/grub2/util/i386/pc/grub-setup.c,v retrieving revision 1.39

i386/pc/grub-setup.c 30 Jun 2008 01:53:00 -0000 renamed from i386/pc/grub-setup.c 26 Jun 2008 15:29:32 -0000 1.39 +1 -1
diff -u -r1.39 grub-setup.c
@@ -452,7 +452,7 @@
     }
 
   /* Now read the core image to determine where the sectors are.  */
-  file = grub_file_open (core_path);
+  file = grub_file_open (core_path_dev);
   if (! file)
     grub_util_error ("%s", grub_errmsg);
 
Applied
#1 lore raw
Quoted 8 lines · Javier Martín

Here goes a small fix to a grub-setup error that has driven /me crazy for the last 4 hours: in the recent split between core_path and core_path_dev, one occurrence of the former that should have been turned into the latter was not, thus making grub-setup spit lots of nonsensical (to me) "error: file not found" messages. I spent a big deal of time trying to debug the wrong piece of code, since I stubbornly thought that the error was in the "read-and-check" loop, while it really was later in the file... Sigh

I understand you were trying to install GRUB to a non-default root. I'm sorry for not testing that.

Quoted 3 lines

The fix is so simple that I post it directly here. If a ChangeLog entry is necessary, I'd propose "complete core_path variable split" or something along that lines.

Actually, it's a real bug, so ChangeLog shouldn't be worded like it's another cosmetic change like the original patch was meant to be.

I've applied your patch. Thank you!

Signature · 2 lines
Regards,
Pavel Roskin