* grub-core/kern/env.c, include/grub/env.h: Change iterator through

all vars to a macro. All users updated.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2013-03-03 01:34:27 +01:00
parent e42b251403
commit 3188131f72
7 changed files with 126 additions and 166 deletions

View file

@ -28,14 +28,6 @@
#include <grub/command.h>
#include <grub/i18n.h>
/* Helper for grub_core_cmd_set. */
static int
print_env (struct grub_env_var *env)
{
grub_printf ("%s=%s\n", env->name, env->value);
return 0;
}
/* set ENVVAR=VALUE */
static grub_err_t
grub_core_cmd_set (struct grub_command *cmd __attribute__ ((unused)),
@ -46,7 +38,9 @@ grub_core_cmd_set (struct grub_command *cmd __attribute__ ((unused)),
if (argc < 1)
{
grub_env_iterate (print_env);
struct grub_env_var *env;
FOR_SORTED_ENV (env)
grub_printf ("%s=%s\n", env->name, env->value);
return 0;
}