]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
pull-in func-params branch
authorBVK Chaitanya <bvk.groups@gmail.com>
Wed, 9 Jun 2010 06:04:01 +0000 (11:34 +0530)
committerBVK Chaitanya <bvk.groups@gmail.com>
Wed, 9 Jun 2010 06:04:01 +0000 (11:34 +0530)
1  2 
include/grub/script_sh.h
script/execute.c
script/parser.y

Simple merge
index 31fce554cda65567ab9cc9e2ebe02b241f6b8db3,4a3f249b085dfe1d9cfa93c7c39c2bf6d5133d6f..691b3c8934b2f9020b837bdff6dc44ec23ca1a42
@@@ -143,22 -182,23 +182,24 @@@ grub_script_arglist_to_argv (struct gru
          switch (arg->type)
            {
            case GRUB_SCRIPT_ARG_TYPE_VAR:
-             value = grub_env_get (arg->str);
-             while (value && *value && (ptr = move_to_next(&value)))
+           case GRUB_SCRIPT_ARG_TYPE_DQVAR:
+             values = grub_script_env_get (arg->str, arg->type);
+             for (i = 0; values && values[i]; i++)
                {
-                 empty = 0;
-                 append (ptr, value - ptr);
-                 if (*value) push(0);
+                 if (i != 0 && grub_script_argv_next (&result))
+                   goto fail;
+                 if (grub_script_argv_append (&result, values[i]))
+                   goto fail;
                }
+             grub_free (values);
              break;
  
 +          case GRUB_SCRIPT_ARG_TYPE_BLOCK:
            case GRUB_SCRIPT_ARG_TYPE_TEXT:
-             if (grub_strlen (arg->str) > 0)
-               {
-                 empty = 0;
-                 append (arg->str, 0);
-               }
+             if (grub_strlen (arg->str) &&
+                 grub_script_argv_append (&result, arg->str))
+               goto fail;
              break;
  
            case GRUB_SCRIPT_ARG_TYPE_DQSTR:
diff --cc script/parser.y
Simple merge