From: BVK Chaitanya Date: Wed, 9 Jun 2010 06:04:01 +0000 (+0530) Subject: pull-in func-params branch X-Git-Tag: 1.99~600^2~27 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3db1c9eee4ebf2893c9a34afaf4b2c3e48ffd9f4;p=thirdparty%2Fgrub.git pull-in func-params branch --- 3db1c9eee4ebf2893c9a34afaf4b2c3e48ffd9f4 diff --cc script/execute.c index 31fce554c,4a3f249b0..691b3c893 --- a/script/execute.c +++ b/script/execute.c @@@ -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: