From 1ec4a279280d34ad2c5f19ef8a8024321aff8607 Mon Sep 17 00:00:00 2001 From: BVK Chaitanya Date: Mon, 16 Aug 2010 15:04:30 +0530 Subject: [PATCH 1/4] export command supports multiple args --- normal/context.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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 From d24c6190aedb2e60401b915675bdf9b4698162b7 Mon Sep 17 00:00:00 2001 From: BVK Chaitanya Date: Wed, 25 Aug 2010 18:34:20 +0530 Subject: [PATCH 2/4] add changelog --- ChangeLog | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ChangeLog b/ChangeLog index 2db022484..bd03c490e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2010-08-25 BVK Chaitanya + + Multiple variable names support to "export" command. + + * normal/context.c (grub_cmd_export): "export" command supports + multiple variable names. + 2010-08-23 BVK Chaitanya New Automake based build system for GRUB. From cd6891117fee18f2a6c594ed39a5fccb85afd8fc Mon Sep 17 00:00:00 2001 From: BVK Chaitanya Date: Wed, 25 Aug 2010 18:39:00 +0530 Subject: [PATCH 3/4] review comment fixes --- grub-core/normal/context.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grub-core/normal/context.c b/grub-core/normal/context.c index 68f7626b9..ec718952d 100644 --- a/grub-core/normal/context.c +++ b/grub-core/normal/context.c @@ -177,7 +177,7 @@ grub_context_init (void) grub_env_export ("prefix"); export_cmd = grub_register_command ("export", grub_cmd_export, - N_("ENVVAR..."), + N_("ENVVAR [ENVVAR] ..."), N_("Export variables.")); } From e35e46fce182084c5719a6e67433f061fa5358b0 Mon Sep 17 00:00:00 2001 From: Vladimir 'phcoder' Serbinenko Date: Wed, 25 Aug 2010 22:32:17 +0200 Subject: [PATCH 4/4] * grub-core/term/ieee1275/ofconsole.c (put): Correct prototype. (readkey): Likewise. --- ChangeLog | 5 +++++ grub-core/term/ieee1275/ofconsole.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1f4f3359e..e46c027b0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2010-08-25 Vladimir Serbinenko + + * grub-core/term/ieee1275/ofconsole.c (put): Correct prototype. + (readkey): Likewise. + 2010-08-25 BVK Chaitanya Multiple variable names support to "export" command. diff --git a/grub-core/term/ieee1275/ofconsole.c b/grub-core/term/ieee1275/ofconsole.c index 604906ceb..9ec85631b 100644 --- a/grub-core/term/ieee1275/ofconsole.c +++ b/grub-core/term/ieee1275/ofconsole.c @@ -55,7 +55,7 @@ static struct color colors[] = }; static void -put (const int c) +put (struct grub_term_output *term __attribute__ ((unused)), const int c) { char chr = c; @@ -63,7 +63,7 @@ put (const int c) } static int -readkey (void) +readkey (struct grub_term_input *term __attribute__ ((unused))) { grub_uint8_t c; grub_ssize_t actual = 0;