[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Fix extraous comma in printf
From: |
Vladimir 'φ-coder/phcoder' Serbinenko |
Subject: |
Re: [PATCH] Fix extraous comma in printf |
Date: |
Sun, 21 Sep 2014 18:17:16 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.0 |
On 21.09.2014 17:58, Andrei Borzenkov wrote:
> В Sun, 21 Sep 2014 17:49:35 +0200
> Vladimir 'φ-coder/phcoder' Serbinenko <address@hidden> пишет:
>
>> Committed, thanks.
>
> You commit contains much more than this single line. Is it intentional?
>
No, thank you for noticing this.
>> On 11.09.2014 12:27, Michael Chang wrote:
>>> This patch is to get intended output from printf shell command, as the
>>> comma is not used as separator for it's arguments, they will eventually
>>> be outputted together with the variables.
>>>
>>> Though it does not affect or break any function currently, I'd like to
>>> address this hidden problem and hope to get some attention of it.
>>>
>>> Thanks.
>>> ---
>>> grub-core/osdep/unix/config.c | 4 ++--
>>> 1 files changed, 2 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/grub-core/osdep/unix/config.c b/grub-core/osdep/unix/config.c
>>> index f4b0bb4..65effa9 100644
>>> --- a/grub-core/osdep/unix/config.c
>>> +++ b/grub-core/osdep/unix/config.c
>>> @@ -105,8 +105,8 @@ grub_util_load_config (struct grub_util_config *cfg)
>>> *ptr++ = *iptr;
>>> }
>>>
>>> - strcpy (ptr, "'; printf
>>> \"GRUB_ENABLE_CRYPTODISK=%s\\nGRUB_DISTRIBUTOR=%s\\n\", "
>>> - "\"$GRUB_ENABLE_CRYPTODISK\", \"$GRUB_DISTRIBUTOR\"");
>>> + strcpy (ptr, "'; printf
>>> \"GRUB_ENABLE_CRYPTODISK=%s\\nGRUB_DISTRIBUTOR=%s\\n\" "
>>> + "\"$GRUB_ENABLE_CRYPTODISK\" \"$GRUB_DISTRIBUTOR\"");
>>>
>>> argv[2] = script;
>>> argv[3] = '\0';
>>>
>>
>>
>
>
>
> _______________________________________________
> Grub-devel mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/grub-devel
>
signature.asc
Description: OpenPGP digital signature