* [PATCH] fix listing values of variables with read hook in set command
@ 2013-05-16 16:43 Andrey Borzenkov
0 siblings, 0 replies; only message in thread
From: Andrey Borzenkov @ 2013-05-16 16:43 UTC (permalink / raw)
To: grub-devel
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 <arvidjaar@gmail.com>
---
ChangeLog | 5 +++++
grub-core/kern/corecmd.c | 2 +-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index e2e38f3..e78c9f5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2013-05-16 Andrey Borzenkov <arvidjaar@gmail.com>
+
+ * grub-core/kern/corecmd.c (grub_core_cmd_set): Use grub_env_get
+ to fetch values when listing.
+
2013-05-15 Radosław Szymczyszyn <lavrin@gmail.com>
* grub-core/partmap/dfly.c: New partition map.
diff --git a/grub-core/kern/corecmd.c b/grub-core/kern/corecmd.c
index e1bb483..54ad32a 100644
--- a/grub-core/kern/corecmd.c
+++ b/grub-core/kern/corecmd.c
@@ -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;
}
--
tg: (0a5312f..) u/list_env (depends on: master)
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2013-05-16 16:43 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-16 16:43 [PATCH] fix listing values of variables with read hook in set command Andrey Borzenkov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).