Fix canonicalize_file_name clash.

canonicalize_file_name clashed with gnulib function. Additionally
it was declared in 2 places: emu/misc.h and util/misc.h. Added
grub_ prefix and removed second declaration.
This commit is contained in:
Vladimir Serbinenko 2015-03-04 01:00:19 +01:00
parent 9d25b0da9a
commit 27d1a67f8a
20 changed files with 30 additions and 30 deletions

View file

@ -406,7 +406,7 @@ grub_util_biosdisk_get_grub_dev (const char *os_dev)
os_dev);
grub_errno = GRUB_ERR_NONE;
canon = canonicalize_file_name (os_dev);
canon = grub_canonicalize_file_name (os_dev);
drive = grub_hostdisk_os_dev_to_grub_drive (canon ? : os_dev, 1);
if (canon)
free (canon);

View file

@ -77,7 +77,7 @@ main (int argc, char *argv[])
}
if (had_file)
grub_util_error ("one argument expected");
argv2[i - 1] = canonicalize_file_name (argv[i]);
argv2[i - 1] = grub_canonicalize_file_name (argv[i]);
if (!argv2[i - 1])
{
grub_util_error (_("cannot open `%s': %s"), argv[i],

View file

@ -651,7 +651,7 @@ argp_parser (int key, char *arg, struct argp_state *state)
{
if (args_count == 0)
images = xmalloc (num_disks * sizeof (images[0]));
images[args_count] = canonicalize_file_name (arg);
images[args_count] = grub_canonicalize_file_name (arg);
args_count++;
return 0;
}

View file

@ -967,7 +967,7 @@ main (int argc, char *argv[])
{
char * t = grub_util_path_concat (2, bootdir, GRUB_DIR_NAME);
grub_install_mkdir_p (t);
grubdir = canonicalize_file_name (t);
grubdir = grub_canonicalize_file_name (t);
if (!grubdir)
grub_util_error (_("failed to get canonical path of `%s'"), t);
free (t);
@ -1299,7 +1299,7 @@ main (int argc, char *argv[])
{
char *t = grub_util_path_concat (2, grubdir,
platname);
platdir = canonicalize_file_name (t);
platdir = grub_canonicalize_file_name (t);
if (!platdir)
grub_util_error (_("failed to get canonical path of `%s'"),
t);

View file

@ -64,7 +64,7 @@ bless (const char *path, int x86)
grub_err_t err;
struct stat st;
grub_path = canonicalize_file_name (path);
grub_path = grub_canonicalize_file_name (path);
if (stat (grub_path, &st) < 0)
grub_util_error (N_("cannot stat `%s': %s"),

View file

@ -547,7 +547,7 @@ argp_parser (int key, char *arg, struct argp_state *state)
}
images = xrealloc (images, (num_disks + 1) * sizeof (images[0]));
images[num_disks] = canonicalize_file_name (arg);
images[num_disks] = grub_canonicalize_file_name (arg);
num_disks++;
return 0;

View file

@ -262,7 +262,7 @@ probe (const char *path, char **device_names, char delim)
if (path != NULL)
{
grub_path = canonicalize_file_name (path);
grub_path = grub_canonicalize_file_name (path);
if (! grub_path)
grub_util_error (_("failed to get canonical path of `%s'"), path);
device_names = grub_guess_root_devices (grub_path);

View file

@ -175,7 +175,7 @@ main (int argc, char *argv[])
grub_host_init ();
char *t, *inpfull, *rootfull, *res;
t = canonicalize_file_name (arguments.input);
t = grub_canonicalize_file_name (arguments.input);
if (!t)
{
grub_util_error (_("cannot open `%s': %s"), arguments.input,
@ -185,7 +185,7 @@ main (int argc, char *argv[])
inpfull = xasprintf ("(host)/%s", t);
free (t);
t = canonicalize_file_name (arguments.root ? : "/");
t = grub_canonicalize_file_name (arguments.root ? : "/");
if (!t)
{
grub_util_error (_("cannot open `%s': %s"), arguments.root,
@ -206,7 +206,7 @@ main (int argc, char *argv[])
cwd = xstrdup (".");
}
t = canonicalize_file_name (arguments.cwd ? : cwd);
t = grub_canonicalize_file_name (arguments.cwd ? : cwd);
if (!t)
{
grub_util_error (_("cannot open `%s': %s"), arguments.root,

View file

@ -73,7 +73,7 @@ grub_util_guess_bios_drive (const char *orig_path)
{
char *canon;
char *ptr;
canon = canonicalize_file_name (orig_path);
canon = grub_canonicalize_file_name (orig_path);
if (!canon)
return NULL;
ptr = strrchr (orig_path, '/');
@ -102,7 +102,7 @@ grub_util_guess_efi_drive (const char *orig_path)
{
char *canon;
char *ptr;
canon = canonicalize_file_name (orig_path);
canon = grub_canonicalize_file_name (orig_path);
if (!canon)
return NULL;
ptr = strrchr (orig_path, '/');
@ -131,7 +131,7 @@ grub_util_guess_baremetal_drive (const char *orig_path)
{
char *canon;
char *ptr;
canon = canonicalize_file_name (orig_path);
canon = grub_canonicalize_file_name (orig_path);
if (!canon)
return NULL;
ptr = strrchr (orig_path, '/');

View file

@ -157,7 +157,7 @@ grub_util_render_label (const char *label_font,
ieee1275_palette[cptr].a = 0xff;
char * t;
t = canonicalize_file_name (label_font);
t = grub_canonicalize_file_name (label_font);
if (!t)
{
grub_util_error (_("cannot open `%s': %s"), label_font,