grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] grub-core/kern/corecmd: Quote variable values when displayed


From: Daniel Kiper
Subject: Re: [PATCH] grub-core/kern/corecmd: Quote variable values when displayed by the set command
Date: Fri, 19 Aug 2022 16:03:03 +0200
User-agent: NeoMutt/20170113 (1.7.2)

On Tue, Aug 16, 2022 at 03:22:53PM -0500, Glenn Washburn wrote:
> 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>

Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>

... but I have strange feeling I should wait a bit before merging it.

Anyway, if I do not hear any objections I will take this patch...

> ---
>  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;
>      }

Daniel



reply via email to

[Prev in Thread] Current Thread [Next in Thread]