kbuild: Fix missing '\n' for NEW symbols in yes "" | make oldconfig >conf.new
PATCH 1/1 kbuild: Fix missing '\n' for NEW symbols in yes "" | make oldconfig >conf.new
From: Ben Hutchings <[email protected]>
According to Documentation/kbuild/kconfig.txt, the commands:
yes "" | make oldconfig >conf.new
grep "(NEW)" conf.new
should list the new config symbols with their default values. However, currently there is no line break after each new symbol. When kconfig is interactive the user will type a new-line at this point, but when non-interactive kconfig must print it.
---
Reference: http://bugs.debian.org/636029
Applied and tested to 3.8.0-rc4, on top of commit
5da1f88 - Linus Torvalds, 2013-01-18 : Merge tag 'usb-3.8-rc4' of git:/
--- scripts/kconfig/conf.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
scripts/kconfig/conf.c +6 -1
@@ -36,6 +36,7 @@ enum input_mode { } input_mode = oldaskconfig;static int indent =1 ; +static int tty_stdio;static int valid_stdin =1 ;static int sync_kconfig;static int conf_cnt;
@@ -108,6 +109,8 @@ static int conf_askvalue(struct symbol *sym, const char *def)case oldaskconfig:fflush (stdout);xfgets (line,128 , stdin); +if (!tty_stdio) +printf ("\n" );return 1 ;default :break ;
@@ -495,6 +498,8 @@ int main(int ac, char **av)bindtextdomain (PACKAGE ,LOCALEDIR );textdomain (PACKAGE ); + tty_stdio =isatty (0 ) &&isatty (1 ) &&isatty (2 ); +while ((opt =getopt_long (ac, av,"" , long_opts,NULL )) !=-1 ) { input_mode = (enum input_mode )opt;switch (opt) {
@@ -621,7 +626,7 @@ int main(int ac, char **av)return 1 ; } } - valid_stdin =isatty (0 ) &&isatty (1 ) &&isatty (2 ); + valid_stdin = tty_stdio; }switch (input_mode) {
Signature · 1 line
1.7.10.4
Quoted 2 lines · Regid Ichira
Applied and tested to 3.8.0-rc4, on top of commit
5da1f88 - Linus Torvalds, 2013-01-18 : Merge tag 'usb-3.8-rc4' of git:/
Thanks, Regid. This looks like a good change, correctly implemented, so
Re: Bug#636029: [PATCH] kbuild: Fix missing '\n' for NEW symbols in yes "" | make oldconfig >conf.new
In reply to Regid IchiraQuoted 7 lines · Regid Ichira
From: Ben Hutchings <[email protected]>
According to
Documentation/kbuild/kconfig.txt, the commands:yes "" | make oldconfig >conf.new
grep "(NEW)" conf.new
Quoted 7 lines
should list the new config symbols with their default values. However, currently there is no line break after each new symbol. When kconfig is interactive the user will type a new-line at this point, but when non-interactive kconfig must print it.
Signed-off-by Ben Hutchings <[email protected]>---
Don't put a '---' here, as the following pseudo-headers should go into the commit message.
Quoted 2 lines
Reference: http://bugs.debian.org/636029
Reported-by [email protected]
Well that's you, isn't it?
Quoted 2 lines
[[email protected]: Adjusted Ben's work to apply cleanly to this tree]Tested-by Regid Ichira <[email protected]>
[...]
So it should be Reported-and-tested-by: Regid Ichira <[email protected]>
Anyway, thanks for moving this forward.
Ben.
Signature · 2 lines
Ben Hutchings Sturgeon's Law: Ninety percent of everything is crap.
Re: Bug#636029: [PATCH] kbuild: Fix missing '\n' for NEW symbols in yes "" | make oldconfig >conf.new
Quoted 22 lines · Ben Hutchings
Quoted 7 lines · Regid Ichira
From: Ben Hutchings <[email protected]>
According to
Documentation/kbuild/kconfig.txt, the commands:yes "" | make oldconfig >conf.new
grep "(NEW)" conf.newQuoted 7 lines
should list the new config symbols with their default values. However, currently there is no line break after each new symbol. When kconfig is interactive the user will type a new-line at this point, but when non-interactive kconfig must print it.
Signed-off-by Ben Hutchings <[email protected]>---
Don't put a '---' here, as the following pseudo-headers should go into the commit message.
Quoted 2 lines
Reference: http://bugs.debian.org/636029
Reported-by [email protected]
Quoted 7 lines
Well that's you, isn't it?
Quoted 2 lines
[[email protected]: Adjusted Ben's work to apply cleanly to this tree]Tested-by Regid Ichira <[email protected]>[...]
So it should be Reported-and-tested-by: Regid Ichira <[email protected]>
I applied the patch with this tag to kbuild.git#kconfig.
Michal