aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/kconfig
diff options
context:
space:
mode:
authorArnaud Lacombe <lacombar@gmail.com>2010-11-02 00:26:33 -0400
committerArnaud Lacombe <lacombar@gmail.com>2011-07-02 01:04:39 -0400
commit32543999f31e8e3a25325cc7c25d98db0c111118 (patch)
treed1f35c9d172cc20c3a2bd0231b1657a876802f70 /scripts/kconfig
parent275744cc8da0fd006e8f8fc1090f01dc0296810d (diff)
kconfig/conf: add command line options' description
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
Diffstat (limited to 'scripts/kconfig')
-rw-r--r--scripts/kconfig/conf.c32
1 files changed, 31 insertions, 1 deletions
diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c
index 6431f5c004d..819ab18961f 100644
--- a/scripts/kconfig/conf.c
+++ b/scripts/kconfig/conf.c
@@ -457,8 +457,28 @@ static struct option long_opts[] = {
457 {NULL, 0, NULL, 0} 457 {NULL, 0, NULL, 0}
458}; 458};
459 459
460static void conf_usage(const char *progname)
461{
462
463 printf("Usage: %s [option] <kconfig-file>\n", progname);
464 printf("[option] is _one_ of the following:\n");
465 printf(" --listnewconfig List new options\n");
466 printf(" --oldaskconfig Start a new configuration using a line-oriented program\n");
467 printf(" --oldconfig Update a configuration using a provided .config as base\n");
468 printf(" --silentoldconfig Same as oldconfig, but quietly, additionally update deps\n");
469 printf(" --oldnoconfig Same as silentoldconfig but set new symbols to no\n");
470 printf(" --defconfig <file> New config with default defined in <file>\n");
471 printf(" --savedefconfig <file> Save the minimal current configuration to <file>\n");
472 printf(" --allnoconfig New config where all options are answered with no\n");
473 printf(" --allyesconfig New config where all options are answered with yes\n");
474 printf(" --allmodconfig New config where all options are answered with mod\n");
475 printf(" --alldefconfig New config with all symbols set to default\n");
476 printf(" --randconfig New config with random answer to all options\n");
477}
478
460int main(int ac, char **av) 479int main(int ac, char **av)
461{ 480{
481 const char *progname = av[0];
462 int opt; 482 int opt;
463 const char *name, *defconfig_file = NULL /* gcc uninit */; 483 const char *name, *defconfig_file = NULL /* gcc uninit */;
464 struct stat tmpstat; 484 struct stat tmpstat;
@@ -492,14 +512,24 @@ int main(int ac, char **av)
492 srand(seed); 512 srand(seed);
493 break; 513 break;
494 } 514 }
515 case oldaskconfig:
516 case oldconfig:
517 case allnoconfig:
518 case allyesconfig:
519 case allmodconfig:
520 case alldefconfig:
521 case listnewconfig:
522 case oldnoconfig:
523 break;
495 case '?': 524 case '?':
496 fprintf(stderr, _("See README for usage info\n")); 525 conf_usage(progname);
497 exit(1); 526 exit(1);
498 break; 527 break;
499 } 528 }
500 } 529 }
501 if (ac == optind) { 530 if (ac == optind) {
502 printf(_("%s: Kconfig file missing\n"), av[0]); 531 printf(_("%s: Kconfig file missing\n"), av[0]);
532 conf_usage(progname);
503 exit(1); 533 exit(1);
504 } 534 }
505 name = av[optind]; 535 name = av[optind];