fix listing values of variables with read hook in set command
PATCH 1/1 fix listing values of variables with read hook in set command
Variables with read hook may return valid value even before they are explicitly set. Use grub_env_get() to fetch values to ensure hooks are called.
Signed-off-by Andrey Borzenkov <[email protected]>
--- ChangeLog | 5 +++++ grub-core/kern/corecmd.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-)
ChangeLog +5 -0
@@ -1,3 +1,8 @@ +2013-05-16 Andrey Borzenkov <[email protected]> + + * grub-core/kern/corecmd.c (grub_core_cmd_set): Use grub_env_get + to fetch values when listing. + 2013-05-15 Radosław Szymczyszyn <[email protected]> * grub-core/partmap/dfly.c: New partition map.
grub-core/kern/corecmd.c +1 -1
@@ -40,7 +40,7 @@ grub_core_cmd_set (struct grub_command *cmd __attribute__ ((unused)), {struct grub_env_var *env; FOR_SORTED_ENV (env) - grub_printf ("%s=%s\n", env->name, env->value); + grub_printf ("%s=%s\n", env->name, grub_env_get (env->name));return 0 ; }
Signature · 1 line
tg: (0a5312f..) u/list_env (depends on: master)