From bc108a4a8a4d20dd122cee786befc99bcbe48735 Mon Sep 17 00:00:00 2001 From: Vladimir 'phcoder' Serbinenko Date: Sun, 13 Nov 2011 19:53:12 +0100 Subject: [PATCH] * util/grub-mount.c (argp_parser): Accept relative pathes. * util/grub-fstest.c (argp_parser): Likewise. --- ChangeLog | 5 +++++ util/grub-fstest.c | 7 +------ util/grub-mount.c | 7 +------ 3 files changed, 7 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8c3ccb631..d3c48339e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2011-11-13 Vladimir Serbinenko + + * util/grub-mount.c (argp_parser): Accept relative pathes. + * util/grub-fstest.c (argp_parser): Likewise. + 2011-11-13 Vladimir Serbinenko Plan9 support. diff --git a/util/grub-fstest.c b/util/grub-fstest.c index c9f24ff08..886155fe2 100644 --- a/util/grub-fstest.c +++ b/util/grub-fstest.c @@ -562,14 +562,9 @@ argp_parser (int key, char *arg, struct argp_state *state) if (args_count < num_disks) { - if (arg[0] != '/') - { - fprintf (stderr, "%s", _("Must use absolute path.\n")); - argp_usage (state); - } if (args_count == 0) images = xmalloc (num_disks * sizeof (images[0])); - images[args_count] = xstrdup (arg); + images[args_count] = canonicalize_file_name (arg); args_count++; return 0; } diff --git a/util/grub-mount.c b/util/grub-mount.c index a4be21738..da7d604a2 100644 --- a/util/grub-mount.c +++ b/util/grub-mount.c @@ -489,13 +489,8 @@ argp_parser (int key, char *arg, struct argp_state *state) return 0; } - if (arg[0] != '/') - { - fprintf (stderr, "%s", _("Must use absolute path.\n")); - argp_usage (state); - } images = xrealloc (images, (num_disks + 1) * sizeof (images[0])); - images[num_disks] = xstrdup (arg); + images[num_disks] = canonicalize_file_name (arg); num_disks++; return 0;