Fix extraous comma in printf
PATCH 1/1 Fix extraous comma in printf
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(-)
grub-core/osdep/unix/config.c +2 -2
@@ -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' ;
Signature · 1 line
1.7.3.4
Committed, thanks.
Quoted 28 lines · Michael Chang
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(-)grub-core/osdep/unix/config.c +2
-2@@ -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' ;
В Sun, 21 Sep 2014 17:49:35 +0200
Vladimir 'φ-coder/phcoder' Serbinenko <[email protected]> пишет:
Quoted 1 line
Committed, thanks.
You commit contains much more than this single line. Is it intentional?
Quoted 31 lines · Michael Chang
Quoted 28 lines
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(-)grub-core/osdep/unix/config.c +2
-2@@ -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' ;
Quoted 7 lines · Andrei Borzenkov
В Sun, 21 Sep 2014 17:49:35 +0200
Vladimir 'φ-coder/phcoder' Serbinenko <[email protected]> пишет:Quoted 1 line
Committed, thanks.
You commit contains much more than this single line. Is it intentional?
No, thank you for noticing this.
Quoted 39 lines
Quoted 21 lines · Michael Chang
Quoted 20 lines
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(-)grub-core/osdep/unix/config.c +0
-0@@ -105,8 +105,8 @@ grub_util_load_config (struct grub_util_config *cfg) *ptr++ = *iptr; }Quoted 10 lines
grub-core/osdep/unix/config.c grub_util_load_config (struct grub_util_config *cfg) · line 112
Quoted 8 lines
grub-core/osdep/unix/config.c +2
-2-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
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel