From: Glenn Washburn <development@efficientek.com>
To: grub-devel@gnu.org, Daniel Kiper <dkiper@net-space.pl>
Cc: Glenn Washburn <development@efficientek.com>
Subject: [PATCH] grub-core/kern/corecmd: Quote variable values when displayed by the set command
Date: Tue, 16 Aug 2022 15:22:53 -0500 [thread overview]
Message-ID: <20220816202253.258771-1-development@efficientek.com> (raw)
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 <development@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
next reply other threads:[~2022-08-16 20:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-16 20:22 Glenn Washburn [this message]
2022-08-19 14:03 ` [PATCH] grub-core/kern/corecmd: Quote variable values when displayed by the set command Daniel Kiper
2022-08-19 22:11 ` Glenn Washburn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220816202253.258771-1-development@efficientek.com \
--to=development@efficientek.com \
--cc=dkiper@net-space.pl \
--cc=grub-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.