From: BVK Chaitanya Date: Mon, 16 Aug 2010 09:34:30 +0000 (+0530) Subject: export command supports multiple args X-Git-Tag: 1.99~645^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1ec4a279280d34ad2c5f19ef8a8024321aff8607;p=thirdparty%2Fgrub.git export command supports multiple args --- diff --git a/normal/context.c b/normal/context.c index 27adf287a..68f7626b9 100644 --- a/normal/context.c +++ b/normal/context.c @@ -158,11 +158,15 @@ static grub_err_t grub_cmd_export (struct grub_command *cmd __attribute__ ((unused)), int argc, char **args) { + int i; + if (argc < 1) return grub_error (GRUB_ERR_BAD_ARGUMENT, "no environment variable specified"); - grub_env_export (args[0]); + for (i = 0; i < argc; i++) + grub_env_export (args[i]); + return 0; } @@ -173,7 +177,8 @@ grub_context_init (void) grub_env_export ("prefix"); export_cmd = grub_register_command ("export", grub_cmd_export, - N_("ENVVAR"), N_("Export a variable.")); + N_("ENVVAR..."), + N_("Export variables.")); } void