Variable values may contain spaces at the end or newlines. However, when
displayed without quotes this is not obvious and can lead to confusion as
to the actual contents of variables.

Signed-off-by: Glenn Washburn <developm...@efficientek.com>
---
 grub-core/kern/corecmd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/grub-core/kern/corecmd.c b/grub-core/kern/corecmd.c
index fc54f43f2..ac976e4c6 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, grub_env_get (env->name));
+       grub_printf ("%s=\"%s\"\n", env->name, grub_env_get (env->name));
       return 0;
     }
 
-- 
2.34.1


_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to