* util/grub-mount.c (argp_parser): Accept relative pathes.

* util/grub-fstest.c (argp_parser): Likewise.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2011-11-13 19:53:12 +01:00
parent 111c17782a
commit bc108a4a8a
3 changed files with 7 additions and 12 deletions

View file

@ -1,3 +1,8 @@
2011-11-13 Vladimir Serbinenko <phcoder@gmail.com>
* util/grub-mount.c (argp_parser): Accept relative pathes.
* util/grub-fstest.c (argp_parser): Likewise.
2011-11-13 Vladimir Serbinenko <phcoder@gmail.com> 2011-11-13 Vladimir Serbinenko <phcoder@gmail.com>
Plan9 support. Plan9 support.

View file

@ -562,14 +562,9 @@ argp_parser (int key, char *arg, struct argp_state *state)
if (args_count < num_disks) if (args_count < num_disks)
{ {
if (arg[0] != '/')
{
fprintf (stderr, "%s", _("Must use absolute path.\n"));
argp_usage (state);
}
if (args_count == 0) if (args_count == 0)
images = xmalloc (num_disks * sizeof (images[0])); images = xmalloc (num_disks * sizeof (images[0]));
images[args_count] = xstrdup (arg); images[args_count] = canonicalize_file_name (arg);
args_count++; args_count++;
return 0; return 0;
} }

View file

@ -489,13 +489,8 @@ argp_parser (int key, char *arg, struct argp_state *state)
return 0; 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 = xrealloc (images, (num_disks + 1) * sizeof (images[0]));
images[num_disks] = xstrdup (arg); images[num_disks] = canonicalize_file_name (arg);
num_disks++; num_disks++;
return 0; return 0;