Skip to contentSkip to conversation

Remove grub_get_prefix()

PATCH Applied Christian Franke 2 participants 2 messages Apr 18, 2010 – Apr 26, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Remove grub_get_prefix()

This patch removes grub_get_prefix() and replaces the two remaining calls with make_system_path_relative_to_its_root(). Already discussed in thread "[PATCH] Fix Cygwin path handling".

Change in util/grub-emu.c was tested, but not the change in util/sparc64/ieee1275/grub-setup.c.

Signature · 2 lines
Regards,
Christian Franke

=== modified file 'ChangeLog'

ChangeLog +10 -1
@@ -1,3 +1,12 @@
+2010-04-18  Christian Franke  <[email protected]>
+
+	* include/grub/util/getroot.h (grub_get_prefix): Remove prototype.
+	* util/getroot.c [__CYGWIN__] (get_win32_path): Remove function.
+	(grub_get_prefix): Remove function.
+	* util/grub-emu.c (main): Replace grub_get_prefix () call by
+	make_system_path_relative_to_its_root ().
+	* util/sparc64/ieee1275/grub-setup.c (main): Likewise.
+
 2010-04-18  Vladimir Serbinenko  <[email protected]>
 
 	* po/POTFILES: Renamed multiboot_loader.c to multiboot.c
@@ -10,7 +19,7 @@
 
 	* disk/lvm.c (grub_lvm_memberlist): Issue an error if pv->disk = 0.
 
-2010-04-17  Christian Franke <[email protected]>
+2010-04-17  Christian Franke  <[email protected]>
 
 	* Makefile.in: Add missing localedir setting.
 

=== modified file 'include/grub/util/getroot.h'

grub/util/getroot.h +0 -1
@@ -26,7 +26,6 @@
 };
 
 char *grub_guess_root_device (const char *dir);
-char *grub_get_prefix (const char *dir);
 int grub_util_get_dev_abstraction (const char *os_dev);
 char *grub_util_get_grub_dev (const char *os_dev);
 const char *grub_util_check_block_device (const char *blk_dev);

=== modified file 'util/getroot.c'

getroot.c +0 -97

103 lines not on this page · raw message

=== modified file 'util/grub-emu.c'

grub-emu.c +1 -1
@@ -242,7 +242,7 @@
   if (strcmp (root_dev, "host") == 0)
     dir = xstrdup (dir);
   else
-    dir = grub_get_prefix (dir);
+    dir = make_system_path_relative_to_its_root (dir);
   prefix = xmalloc (strlen (root_dev) + 2 + strlen (dir) + 1);
   sprintf (prefix, "(%s)%s", root_dev, dir);
   free (dir);

=== modified file 'util/sparc64/ieee1275/grub-setup.c'

sparc64/ieee1275/grub-setup.c +2 -1
@@ -635,7 +635,8 @@
 
   find_dest_dev (&ginfo, argv);
 
-  ginfo.prefix = grub_get_prefix (ginfo.dir ? : DEFAULT_DIRECTORY);
+  ginfo.prefix = make_system_path_relative_to_its_root (ginfo.dir ?
+							: DEFAULT_DIRECTORY);
 
   check_root_dev (&ginfo);
 
#1 lore raw

Applied

Quoted 13 lines · Christian Franke

This patch removes grub_get_prefix() and replaces the two remaining calls with make_system_path_relative_to_its_root(). Already discussed in thread "[PATCH] Fix Cygwin path handling".

Change in util/grub-emu.c was tested, but not the change in util/sparc64/ieee1275/grub-setup.c.

------------------------------------------------------------------------

_______________________________________________
Grub-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/grub-devel

Signature · 2 lines
Regards
Vladimir 'φ-coder/phcoder' Serbinenko