]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
* grub-core/commands/wildcard.c (match_files): Add a useful dprintf.
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Fri, 24 Jun 2011 11:43:10 +0000 (13:43 +0200)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Fri, 24 Jun 2011 11:43:10 +0000 (13:43 +0200)
(wildcard_expand): Don't stop on nonregexp parts after regexp ones since
it truncates the output.
Reported by: Ximin Luo.

ChangeLog
grub-core/commands/wildcard.c

index d21fa1026540c83783d98c0df6629fda11be3f3e..eaee6266abab9047ded8b95e142a71a5c84ea3ab 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2011-06-24  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       * grub-core/commands/wildcard.c (match_files): Add a useful dprintf.
+       (wildcard_expand): Don't stop on nonregexp parts after regexp ones since
+       it truncates the output.
+       Reported by: Ximin Luo.
+
 2011-06-24  Vladimir Serbinenko  <phcoder@gmail.com>
 
        * grub-core/fs/iso9660.c (grub_iso9660_iterate_dir): Skip . and ..
index 32561abe6e58e21925a9dabb49ff5b41a63fae1e..45d819a3ef3039155de7d3782886f7da55eb9988 100644 (file)
@@ -288,6 +288,8 @@ match_files (const char *prefix, const char *suffix, const char *end,
     if (regexec (regexp, name, 0, 0, 0))
       return 0;
 
+    grub_dprintf ("expand", "matched\n");
+
     buffer = grub_xasprintf ("%s%s", dir, name);
     if (! buffer)
       return 1;
@@ -423,8 +425,6 @@ wildcard_expand (const char *s, char ***strs)
   while (*start)
     {
       split_path (start, &noregexop, &regexop);
-      if (noregexop >= regexop) /* no more wildcards */
-       break;
 
       if (make_regex (noregexop, regexop, &regexp))
        goto fail;