kconfig: allow stdin/stdout redirection
author"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Tue Sep 08 22:42:48 2009 +0200 (2009-09-08)
changeset 15241031ea5af395
parent 1523 6c2a6c04187e
child 1525 4647e6fb994a
child 1528 f87b08efe892
kconfig: allow stdin/stdout redirection

Allow stdin/stdout redirection for the CLI conf (not mconf).
This allows to recall a sample and automatically apply the defaults
to new configuration option, with something like the following:
yes "" |ct-ng "sample_name"
kconfig/conf.c
     1.1 --- a/kconfig/conf.c	Mon Sep 07 23:12:25 2009 +0200
     1.2 +++ b/kconfig/conf.c	Tue Sep 08 22:42:48 2009 +0200
     1.3 @@ -67,10 +67,10 @@
     1.4  static void check_stdin(void)
     1.5  {
     1.6  	if (!valid_stdin) {
     1.7 -		printf(_("aborted!\n\n"));
     1.8 -		printf(_("Console input/output is redirected. "));
     1.9 -		printf(_("Run 'make oldconfig' to update configuration.\n\n"));
    1.10 -		exit(1);
    1.11 +		/* For crosstool-NG, we don't care if stdin/stdout got redirected.
    1.12 +		 * In this case, just printf a cariage return, for pretty output.
    1.13 +		 */
    1.14 +		printf("\n");
    1.15  	}
    1.16  }
    1.17