From df5ceb21a0574898799f6571555b8bf7da539b2b Mon Sep 17 00:00:00 2001 From: Vladimir 'phcoder' Serbinenko Date: Sun, 13 Jan 2013 22:45:16 +0100 Subject: [PATCH 106/482] * grub-core/kern/emu/hostdisk.c (read_device_map): Explicitly delimit path in strings using quotes. * util/getroot.c (grub_guess_root_devices): Likewise. (grub_make_system_path_relative_to_its_root): Likewise. * util/grub-probe.c (probe): Likewise. * util/ieee1275/ofpath.c (find_obppath): Likewise. (xrealpath): Likewise. --- ChangeLog | 10 ++++++++++ grub-core/kern/emu/hostdisk.c | 2 +- util/getroot.c | 4 ++-- util/grub-probe.c | 2 +- util/ieee1275/ofpath.c | 4 ++-- 5 files changed, 16 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index ea90383..1c0e633 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,15 @@ 2013-01-13 Vladimir Serbinenko + * grub-core/kern/emu/hostdisk.c (read_device_map): Explicitly + delimit path in strings using quotes. + * util/getroot.c (grub_guess_root_devices): Likewise. + (grub_make_system_path_relative_to_its_root): Likewise. + * util/grub-probe.c (probe): Likewise. + * util/ieee1275/ofpath.c (find_obppath): Likewise. + (xrealpath): Likewise. + +2013-01-13 Vladimir Serbinenko + Fix compilation with older compilers. * grub-core/Makefile.core.def (mpi): Add mpi-inline.c. diff --git a/grub-core/kern/emu/hostdisk.c b/grub-core/kern/emu/hostdisk.c index b8c3766..ccd2417 100644 --- a/grub-core/kern/emu/hostdisk.c +++ b/grub-core/kern/emu/hostdisk.c @@ -1339,7 +1339,7 @@ read_device_map (const char *dev_map) { map[drive].device = xmalloc (PATH_MAX); if (! realpath (p, map[drive].device)) - grub_util_error (_("failed to get canonical path of %s"), p); + grub_util_error (_("failed to get canonical path of `%s'"), p); } else #endif diff --git a/util/getroot.c b/util/getroot.c index 24ce6aa..3b5b0f6 100644 --- a/util/getroot.c +++ b/util/getroot.c @@ -1065,7 +1065,7 @@ grub_guess_root_devices (const char *dir) { *cur = canonicalize_file_name (tmp); if (*cur == NULL) - grub_util_error (_("failed to get canonical path of %s"), tmp); + grub_util_error (_("failed to get canonical path of `%s'"), tmp); free (tmp); } root = (strcmp (*cur, "/dev/root") == 0); @@ -2778,7 +2778,7 @@ grub_make_system_path_relative_to_its_root (const char *path) /* canonicalize. */ p = canonicalize_file_name (path); if (p == NULL) - grub_util_error (_("failed to get canonical path of %s"), path); + grub_util_error (_("failed to get canonical path of `%s'"), path); /* For ZFS sub-pool filesystems, could be extended to others (btrfs?). */ #if !defined (__MINGW32__) && !defined (__CYGWIN__) diff --git a/util/grub-probe.c b/util/grub-probe.c index c2a0f62..b66cbea 100644 --- a/util/grub-probe.c +++ b/util/grub-probe.c @@ -327,7 +327,7 @@ probe (const char *path, char **device_names, char delim) { grub_path = canonicalize_file_name (path); if (! grub_path) - grub_util_error (_("failed to get canonical path of %s"), path); + grub_util_error (_("failed to get canonical path of `%s'"), path); device_names = grub_guess_root_devices (grub_path); free (grub_path); } diff --git a/util/ieee1275/ofpath.c b/util/ieee1275/ofpath.c index 9de9ffc..f0a34b5 100644 --- a/util/ieee1275/ofpath.c +++ b/util/ieee1275/ofpath.c @@ -131,7 +131,7 @@ find_obppath (const char *sysfs_path_orig) kill_trailing_dir(sysfs_path); if (!strcmp(sysfs_path, "/sys")) { - grub_util_info (_("'obppath' not found in parent dirs of %s," + grub_util_info (_("`obppath' not found in parent dirs of `%s'," " no IEEE1275 name discovery"), sysfs_path_orig); free (path); @@ -164,7 +164,7 @@ xrealpath (const char *in) out = realpath (in, NULL); #endif if (!out) - grub_util_error (_("failed to get canonical path of %s"), in); + grub_util_error (_("failed to get canonical path of `%s'"), in); return out; } -- 1.8.2.1