* [PATCH] Fix extraous comma in printf
@ 2014-09-11 10:27 Michael Chang
2014-09-21 15:49 ` Vladimir 'φ-coder/phcoder' Serbinenko
0 siblings, 1 reply; 4+ messages in thread
From: Michael Chang @ 2014-09-11 10:27 UTC (permalink / raw)
To: grub-devel
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';
--
1.7.3.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] Fix extraous comma in printf
2014-09-11 10:27 [PATCH] Fix extraous comma in printf Michael Chang
@ 2014-09-21 15:49 ` Vladimir 'φ-coder/phcoder' Serbinenko
2014-09-21 15:58 ` Andrei Borzenkov
0 siblings, 1 reply; 4+ messages in thread
From: Vladimir 'φ-coder/phcoder' Serbinenko @ 2014-09-21 15:49 UTC (permalink / raw)
To: The development of GNU GRUB
[-- Attachment #1: Type: text/plain, Size: 1192 bytes --]
Committed, thanks.
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';
>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 213 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Fix extraous comma in printf
2014-09-21 15:49 ` Vladimir 'φ-coder/phcoder' Serbinenko
@ 2014-09-21 15:58 ` Andrei Borzenkov
2014-09-21 16:17 ` Vladimir 'φ-coder/phcoder' Serbinenko
0 siblings, 1 reply; 4+ messages in thread
From: Andrei Borzenkov @ 2014-09-21 15:58 UTC (permalink / raw)
To: The development of GNU GRUB
[-- Attachment #1: Type: text/plain, Size: 1445 bytes --]
В Sun, 21 Sep 2014 17:49:35 +0200
Vladimir 'φ-coder/phcoder' Serbinenko <phcoder@gmail.com> пишет:
> Committed, thanks.
You commit contains much more than this single line. Is it intentional?
> 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';
> >
>
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Fix extraous comma in printf
2014-09-21 15:58 ` Andrei Borzenkov
@ 2014-09-21 16:17 ` Vladimir 'φ-coder/phcoder' Serbinenko
0 siblings, 0 replies; 4+ messages in thread
From: Vladimir 'φ-coder/phcoder' Serbinenko @ 2014-09-21 16:17 UTC (permalink / raw)
To: The development of GNU GRUB
[-- Attachment #1: Type: text/plain, Size: 1708 bytes --]
On 21.09.2014 17:58, Andrei Borzenkov wrote:
> В Sun, 21 Sep 2014 17:49:35 +0200
> Vladimir 'φ-coder/phcoder' Serbinenko <phcoder@gmail.com> пишет:
>
>> 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
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 213 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-09-21 16:17 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-11 10:27 [PATCH] Fix extraous comma in printf Michael Chang
2014-09-21 15:49 ` Vladimir 'φ-coder/phcoder' Serbinenko
2014-09-21 15:58 ` Andrei Borzenkov
2014-09-21 16:17 ` Vladimir 'φ-coder/phcoder' Serbinenko
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).