mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-21 14:59:34 +00:00
* grub-core/commands/wildcard.c (check_file): Fix bad logic.
put explicit "/" for empty path. (wildcard_expand): Improve dprintf.
This commit is contained in:
1 parent
c59bdff709
commit
58eee08fff
2 files changed
+10
-4
No files matched your search
@@ -1,3 +1,9 @@
|
|||||||
|
2012-06-27 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* grub-core/commands/wildcard.c (check_file): Fix bad logic.
|
||||||
|
put explicit "/" for empty path.
|
||||||
|
(wildcard_expand): Improve dprintf.
|
||||||
|
|
||||||
2012-06-27 Vladimir Serbinenko <phcoder@gmail.com>
|
2012-06-27 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
* grub-core/fs/fshelp.c (grub_fshelp_find_file): Don't free oldnode if
|
* grub-core/fs/fshelp.c (grub_fshelp_find_file): Don't free oldnode if
|
||||||
|
|||||||
@@ -381,7 +381,7 @@ check_file (const char *dir, const char *basename)
|
|||||||
int match (const char *name, const struct grub_dirhook_info *info)
|
int match (const char *name, const struct grub_dirhook_info *info)
|
||||||
{
|
{
|
||||||
if (basename[0] == 0
|
if (basename[0] == 0
|
||||||
&& (info->case_insensitive ? grub_strcasecmp (name, basename) == 0
|
|| (info->case_insensitive ? grub_strcasecmp (name, basename) == 0
|
||||||
: grub_strcmp (name, basename) == 0))
|
: grub_strcmp (name, basename) == 0))
|
||||||
{
|
{
|
||||||
found = 1;
|
found = 1;
|
||||||
@@ -410,7 +410,7 @@ check_file (const char *dir, const char *basename)
|
|||||||
else
|
else
|
||||||
path = dir;
|
path = dir;
|
||||||
|
|
||||||
fs->dir (dev, path, match);
|
fs->dir (dev, path[0] ? path : "/", match);
|
||||||
if (grub_errno == 0 && basename[0] == 0)
|
if (grub_errno == 0 && basename[0] == 0)
|
||||||
found = 1;
|
found = 1;
|
||||||
|
|
||||||
@@ -505,8 +505,8 @@ wildcard_expand (const char *s, char ***strs)
|
|||||||
*p = 0;
|
*p = 0;
|
||||||
if (!check_file (n, p + 1))
|
if (!check_file (n, p + 1))
|
||||||
{
|
{
|
||||||
grub_dprintf ("expand", "file <%s> not found\n",
|
grub_dprintf ("expand", "file <%s> in <%s> not found\n",
|
||||||
start);
|
p + 1, n);
|
||||||
grub_free (o);
|
grub_free (o);
|
||||||
grub_free (n);
|
grub_free (n);
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
Reference in new issue
Block a user