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