Small fix in i386 grub-setup
PATCH 1/1 Small fix in i386 grub-setup
Hi there - I have found that a grub-setup in i386 recently got borked, and now inserts the core.img filename twice in the path while looking for it the second time: the program tried to find the file "/boot/grubcore.img/core.img" which is obviously wrong. This is a fix, or so I think - it seems the right thing given the function prototype and it works for me.
Index: util/i386/pc/grub-setup.c
===================================================================
RCS file: /sources/grub/grub2/util/i386/pc/grub-setup.c,v retrieving revision 1.37
i386/pc/grub-setup.c +1 -1
@@ -368,7 +368,7 @@/* Make sure that GRUB reads the identical image as the OS. */ tmp_img =xmalloc (core_size); - core_path =grub_util_get_path (DEFAULT_DIRECTORY "core.img" , core_file); + core_path =grub_util_get_path (DEFAULT_DIRECTORY , core_file);/* It is a Good Thing to sync two times. */ sync ();
Quoted 6 lines · Javier Martín
Hi there - I have found that a grub-setup in i386 recently got borked, and now inserts the core.img filename twice in the path while looking for it the second time: the program tried to find the file "
/boot/grubcore.img/core.img" which is obviously wrong. This is a fix, or so I think - it seems the right thing given the function prototype and it works for me.
Thanks. Please could you include a ChangeLog entry?
Signature · 5 lines
Robert Millan <GPLv2> I know my rights; I want my phone call! <DRM> What good is a phone call… if you are unable to speak? (as seen on /.)
Quoted 10 lines · Robert Millan
Quoted 6 lines · Javier Martín
Hi there - I have found that a grub-setup in i386 recently got borked, and now inserts the core.img filename twice in the path while looking for it the second time: the program tried to find the file "
/boot/grubcore.img/core.img" which is obviously wrong. This is a fix, or so I think - it seems the right thing given the function prototype and it works for me.Thanks. Please could you include a ChangeLog entry?
Erm, ok... I didn't know if I just had to write it here or include it in the patch, so I did the latter
Index: ChangeLog
===================================================================
RCS file: /sources/grub/grub2/ChangeLog,v
retrieving revision 1.727
ChangeLog +5 -0
@@ -1,3 +1,8 @@ +2008-06-19 Javier Martín <[email protected]> + + * util/i386/pc-grub-setup.c (setup): Remove literal "core.img" in a call to + resolve the core image location that effectively appended the name twice. + 2008-06-19 Robert Millan <[email protected]> * commands/search.c (search_label, search_fs_uuid, search_file): Print
Index: util/i386/pc/grub-setup.c
===================================================================
RCS file: /sources/grub/grub2/util/i386/pc/grub-setup.c,v retrieving revision 1.37
i386/pc/grub-setup.c +1 -1
@@ -368,7 +368,7 @@/* Make sure that GRUB reads the identical image as the OS. */ tmp_img =xmalloc (core_size); - core_path =grub_util_get_path (DEFAULT_DIRECTORY "core.img" , core_file); + core_path =grub_util_get_path (DEFAULT_DIRECTORY , core_file);/* It is a Good Thing to sync two times. */ sync ();
Quoted 5 lines · Javier Martín
Quoted 2 lines
Thanks. Please could you include a ChangeLog entry?
Erm, ok... I didn't know if I just had to write it here or include it in the patch, so I did the latter
I think it's better to include it here (or in the patch header) instead of making it part of the patch, because otherwise it tends to break when ChangeLog changes.
But then again, it's no big deal ;-)
Signature · 5 lines
Robert Millan <GPLv2> I know my rights; I want my phone call! <DRM> What good is a phone call… if you are unable to speak? (as seen on /.)
Quoted 10 lines · Robert Millan
Quoted 6 lines · Javier Martín
Hi there - I have found that a grub-setup in i386 recently got borked, and now inserts the core.img filename twice in the path while looking for it the second time: the program tried to find the file "
/boot/grubcore.img/core.img" which is obviously wrong. This is a fix, or so I think - it seems the right thing given the function prototype and it works for me.Thanks. Please could you include a ChangeLog entry?
Oops. There's a small typo in my ChangeLog entry (pc-grub-setup.c instead of pc/grub-setup.c). It has been corrected in this version
Index: ChangeLog
===================================================================
RCS file: /sources/grub/grub2/ChangeLog,v
retrieving revision 1.727
ChangeLog +5 -0
@@ -1,3 +1,8 @@ +2008-06-19 Javier Martín <[email protected]> + + * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a call to + resolve the core image location that effectively appended the name twice. + 2008-06-19 Robert Millan <[email protected]> * commands/search.c (search_label, search_fs_uuid, search_file): Print
Index: util/i386/pc/grub-setup.c
===================================================================
RCS file: /sources/grub/grub2/util/i386/pc/grub-setup.c,v retrieving revision 1.37
i386/pc/grub-setup.c +1 -1
@@ -368,7 +368,7 @@/* Make sure that GRUB reads the identical image as the OS. */ tmp_img =xmalloc (core_size); - core_path =grub_util_get_path (DEFAULT_DIRECTORY "core.img" , core_file); + core_path =grub_util_get_path (DEFAULT_DIRECTORY , core_file);/* It is a Good Thing to sync two times. */ sync ();
Quoted 9 lines · Javier Martín
Quoted 8 lines · Robert Millan
Quoted 6 lines · Javier Martín
Hi there - I have found that a grub-setup in i386 recently got borked, and now inserts the core.img filename twice in the path while looking for it the second time: the program tried to find the file "
/boot/grubcore.img/core.img" which is obviously wrong. This is a fix, or so I think - it seems the right thing given the function prototype and it works for me.
Quoted 5 lines
Quoted 2 lines
Thanks. Please could you include a ChangeLog entry?
Oops. There's a small typo in my ChangeLog entry (
pc-grub-setup.cinstead ofpc/grub-setup.c). It has been corrected in this version
Committed, thank you.
Signature · 5 lines
Robert Millan <GPLv2> I know my rights; I want my phone call! <DRM> What good is a phone call… if you are unable to speak? (as seen on /.)