* grub-core/kern/corecmd.c (grub_core_cmd_ls): Fix empty path
checking. Reported by: Francesco Lavra.
This commit is contained in:
parent
17806392f1
commit
1359e4740a
2 changed files with 9 additions and 3 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2013-05-15 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* grub-core/kern/corecmd.c (grub_core_cmd_ls): Fix empty path
|
||||||
|
checking.
|
||||||
|
Reported by: Francesco Lavra.
|
||||||
|
|
||||||
2013-05-14 Andrey Borzenkov <arvidjaar@gmail.com>
|
2013-05-14 Andrey Borzenkov <arvidjaar@gmail.com>
|
||||||
|
|
||||||
* gentpl.py: Replace EXTRA_DIST with dist_noinst_DATA or
|
* gentpl.py: Replace EXTRA_DIST with dist_noinst_DATA or
|
||||||
|
|
|
@ -134,18 +134,18 @@ grub_core_cmd_ls (struct grub_command *cmd __attribute__ ((unused)),
|
||||||
|
|
||||||
fs = grub_fs_probe (dev);
|
fs = grub_fs_probe (dev);
|
||||||
path = grub_strchr (argv[0], ')');
|
path = grub_strchr (argv[0], ')');
|
||||||
if (! path)
|
if (! *path)
|
||||||
path = argv[0];
|
path = argv[0];
|
||||||
else
|
else
|
||||||
path++;
|
path++;
|
||||||
|
|
||||||
if (! path && ! device_name)
|
if (! *path && ! device_name)
|
||||||
{
|
{
|
||||||
grub_error (GRUB_ERR_BAD_ARGUMENT, "invalid argument");
|
grub_error (GRUB_ERR_BAD_ARGUMENT, "invalid argument");
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! path)
|
if (! *path)
|
||||||
{
|
{
|
||||||
if (grub_errno == GRUB_ERR_UNKNOWN_FS)
|
if (grub_errno == GRUB_ERR_UNKNOWN_FS)
|
||||||
grub_errno = GRUB_ERR_NONE;
|
grub_errno = GRUB_ERR_NONE;
|
||||||
|
|
Loading…
Add table
Reference in a new issue