diff --git a/ChangeLog b/ChangeLog index 0ca4aaef4..ddd903aab 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2013-03-02 Vladimir Serbinenko + + * grub-core/commands/loadenv.c (grub_cmd_list_env): Move print_var + out of its parent. + 2013-03-02 Vladimir Serbinenko * grub-core/fs/hfs.c: Remove nested functions. diff --git a/grub-core/commands/loadenv.c b/grub-core/commands/loadenv.c index 4b9417327..c0a42c542 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;