mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-20 22:48:22 +00:00
* grub-core/commands/loadenv.c (grub_cmd_list_env): Move print_var
out of its parent.
This commit is contained in:
1 parent
b46d4213d5
commit
74a2742144
2 files changed
+13
-8
No files matched your search
@@ -1,3 +1,8 @@
|
||||
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.
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user