* grub-core/commands/loadenv.c (grub_cmd_list_env): Move print_var
out of its parent.
This commit is contained in:
parent
b46d4213d5
commit
74a2742144
2 changed files with 13 additions and 8 deletions
|
@ -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>
|
2013-03-02 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
* grub-core/fs/hfs.c: Remove nested functions.
|
* grub-core/fs/hfs.c: Remove nested functions.
|
||||||
|
|
|
@ -147,6 +147,14 @@ grub_cmd_load_env (grub_extcmd_context_t ctxt,
|
||||||
return grub_errno;
|
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
|
static grub_err_t
|
||||||
grub_cmd_list_env (grub_extcmd_context_t ctxt,
|
grub_cmd_list_env (grub_extcmd_context_t ctxt,
|
||||||
int argc __attribute__ ((unused)),
|
int argc __attribute__ ((unused)),
|
||||||
|
@ -156,14 +164,6 @@ grub_cmd_list_env (grub_extcmd_context_t ctxt,
|
||||||
grub_file_t file;
|
grub_file_t file;
|
||||||
grub_envblk_t envblk;
|
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);
|
file = open_envblk_file ((state[0].set) ? state[0].arg : 0);
|
||||||
if (! file)
|
if (! file)
|
||||||
return grub_errno;
|
return grub_errno;
|
||||||
|
|
Loading…
Reference in a new issue