dcavalca / rpms / grub2

Forked from rpms/grub2 3 years ago
Clone

Blame SOURCES/0181-grub-core-commands-loadenv.c-grub_cmd_list_env-Move-.patch

f96e0b
From cda677f0e4db75bd50c339706331e4dd36b88926 Mon Sep 17 00:00:00 2001
f96e0b
From: Vladimir 'phcoder' Serbinenko <phcoder@gmail.com>
f96e0b
Date: Sat, 2 Mar 2013 11:45:01 +0100
f96e0b
Subject: [PATCH 181/482] 	* grub-core/commands/loadenv.c
f96e0b
 (grub_cmd_list_env): Move print_var 	out of its parent.
f96e0b
f96e0b
---
f96e0b
 ChangeLog                    |  5 +++++
f96e0b
 grub-core/commands/loadenv.c | 16 ++++++++--------
f96e0b
 2 files changed, 13 insertions(+), 8 deletions(-)
f96e0b
f96e0b
diff --git a/ChangeLog b/ChangeLog
f96e0b
index 0ca4aae..ddd903a 100644
f96e0b
--- a/ChangeLog
f96e0b
+++ b/ChangeLog
f96e0b
@@ -1,5 +1,10 @@
f96e0b
 2013-03-02  Vladimir Serbinenko  <phcoder@gmail.com>
f96e0b
 
f96e0b
+	* grub-core/commands/loadenv.c (grub_cmd_list_env): Move print_var
f96e0b
+	out of its parent.
f96e0b
+
f96e0b
+2013-03-02  Vladimir Serbinenko  <phcoder@gmail.com>
f96e0b
+
f96e0b
 	* grub-core/fs/hfs.c: Remove nested functions.
f96e0b
 
f96e0b
 2013-03-01  Vladimir Serbinenko  <phcoder@gmail.com>
f96e0b
diff --git a/grub-core/commands/loadenv.c b/grub-core/commands/loadenv.c
f96e0b
index 4b94173..c0a42c5 100644
f96e0b
--- a/grub-core/commands/loadenv.c
f96e0b
+++ b/grub-core/commands/loadenv.c
f96e0b
@@ -147,6 +147,14 @@ grub_cmd_load_env (grub_extcmd_context_t ctxt,
f96e0b
   return grub_errno;
f96e0b
 }
f96e0b
 
f96e0b
+/* Print all variables in current context.  */
f96e0b
+static int
f96e0b
+print_var (const char *name, const char *value)
f96e0b
+{
f96e0b
+  grub_printf ("%s=%s\n", name, value);
f96e0b
+  return 0;
f96e0b
+}
f96e0b
+
f96e0b
 static grub_err_t
f96e0b
 grub_cmd_list_env (grub_extcmd_context_t ctxt,
f96e0b
 		   int argc __attribute__ ((unused)),
f96e0b
@@ -156,14 +164,6 @@ grub_cmd_list_env (grub_extcmd_context_t ctxt,
f96e0b
   grub_file_t file;
f96e0b
   grub_envblk_t envblk;
f96e0b
 
f96e0b
-  /* Print all variables in current context.  */
f96e0b
-  auto int print_var (const char *name, const char *value);
f96e0b
-  int print_var (const char *name, const char *value)
f96e0b
-    {
f96e0b
-      grub_printf ("%s=%s\n", name, value);
f96e0b
-      return 0;
f96e0b
-    }
f96e0b
-
f96e0b
   file = open_envblk_file ((state[0].set) ? state[0].arg : 0);
f96e0b
   if (! file)
f96e0b
     return grub_errno;
f96e0b
-- 
f96e0b
1.8.2.1
f96e0b