aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/kconfig/conf.c123
-rw-r--r--scripts/kconfig/confdata.c8
-rwxr-xr-xscripts/kernel-doc4
-rw-r--r--scripts/mod/modpost.c6
4 files changed, 71 insertions, 70 deletions
diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c
index 36b5eedcdc75..3e1057f885c6 100644
--- a/scripts/kconfig/conf.c
+++ b/scripts/kconfig/conf.c
@@ -32,6 +32,7 @@ char *defconfig_file;
32 32
33static int indent = 1; 33static int indent = 1;
34static int valid_stdin = 1; 34static int valid_stdin = 1;
35static int sync_kconfig;
35static int conf_cnt; 36static int conf_cnt;
36static char line[128]; 37static char line[128];
37static struct menu *rootEntry; 38static struct menu *rootEntry;
@@ -65,7 +66,7 @@ static void strip(char *str)
65 66
66static void check_stdin(void) 67static void check_stdin(void)
67{ 68{
68 if (!valid_stdin && input_mode == ask_silent) { 69 if (!valid_stdin) {
69 printf(_("aborted!\n\n")); 70 printf(_("aborted!\n\n"));
70 printf(_("Console input/output is redirected. ")); 71 printf(_("Console input/output is redirected. "));
71 printf(_("Run 'make oldconfig' to update configuration.\n\n")); 72 printf(_("Run 'make oldconfig' to update configuration.\n\n"));
@@ -427,43 +428,6 @@ static void check_conf(struct menu *menu)
427 check_conf(child); 428 check_conf(child);
428} 429}
429 430
430static void conf_do_update(void)
431{
432 /* Update until a loop caused no more changes */
433 do {
434 conf_cnt = 0;
435 check_conf(&rootmenu);
436 } while (conf_cnt);
437}
438
439static int conf_silent_update(void)
440{
441 const char *name;
442
443 if (conf_get_changed()) {
444 name = getenv("KCONFIG_NOSILENTUPDATE");
445 if (name && *name) {
446 fprintf(stderr,
447 _("\n*** Kernel configuration requires explicit update.\n\n"));
448 return 1;
449 }
450 conf_do_update();
451 }
452 return 0;
453}
454
455static int conf_update(void)
456{
457 rootEntry = &rootmenu;
458 conf(&rootmenu);
459 if (input_mode == ask_all) {
460 input_mode = ask_silent;
461 valid_stdin = 1;
462 }
463 conf_do_update();
464 return 0;
465}
466
467int main(int ac, char **av) 431int main(int ac, char **av)
468{ 432{
469 int opt; 433 int opt;
@@ -477,11 +441,11 @@ int main(int ac, char **av)
477 while ((opt = getopt(ac, av, "osdD:nmyrh")) != -1) { 441 while ((opt = getopt(ac, av, "osdD:nmyrh")) != -1) {
478 switch (opt) { 442 switch (opt) {
479 case 'o': 443 case 'o':
480 input_mode = ask_new; 444 input_mode = ask_silent;
481 break; 445 break;
482 case 's': 446 case 's':
483 input_mode = ask_silent; 447 input_mode = ask_silent;
484 valid_stdin = isatty(0) && isatty(1) && isatty(2); 448 sync_kconfig = 1;
485 break; 449 break;
486 case 'd': 450 case 'd':
487 input_mode = set_default; 451 input_mode = set_default;
@@ -519,6 +483,19 @@ int main(int ac, char **av)
519 name = av[optind]; 483 name = av[optind];
520 conf_parse(name); 484 conf_parse(name);
521 //zconfdump(stdout); 485 //zconfdump(stdout);
486 if (sync_kconfig) {
487 if (stat(".config", &tmpstat)) {
488 fprintf(stderr, _("***\n"
489 "*** You have not yet configured your kernel!\n"
490 "*** (missing kernel .config file)\n"
491 "***\n"
492 "*** Please run some configurator (e.g. \"make oldconfig\" or\n"
493 "*** \"make menuconfig\" or \"make xconfig\").\n"
494 "***\n"));
495 exit(1);
496 }
497 }
498
522 switch (input_mode) { 499 switch (input_mode) {
523 case set_default: 500 case set_default:
524 if (!defconfig_file) 501 if (!defconfig_file)
@@ -531,16 +508,6 @@ int main(int ac, char **av)
531 } 508 }
532 break; 509 break;
533 case ask_silent: 510 case ask_silent:
534 if (stat(".config", &tmpstat)) {
535 printf(_("***\n"
536 "*** You have not yet configured your kernel!\n"
537 "*** (missing kernel .config file)\n"
538 "***\n"
539 "*** Please run some configurator (e.g. \"make oldconfig\" or\n"
540 "*** \"make menuconfig\" or \"make xconfig\").\n"
541 "***\n"));
542 exit(1);
543 }
544 case ask_all: 511 case ask_all:
545 case ask_new: 512 case ask_new:
546 conf_read(NULL); 513 conf_read(NULL);
@@ -569,6 +536,19 @@ int main(int ac, char **av)
569 default: 536 default:
570 break; 537 break;
571 } 538 }
539
540 if (sync_kconfig) {
541 if (conf_get_changed()) {
542 name = getenv("KCONFIG_NOSILENTUPDATE");
543 if (name && *name) {
544 fprintf(stderr,
545 _("\n*** Kernel configuration requires explicit update.\n\n"));
546 return 1;
547 }
548 }
549 valid_stdin = isatty(0) && isatty(1) && isatty(2);
550 }
551
572 switch (input_mode) { 552 switch (input_mode) {
573 case set_no: 553 case set_no:
574 conf_set_all_new_symbols(def_no); 554 conf_set_all_new_symbols(def_no);
@@ -585,27 +565,38 @@ int main(int ac, char **av)
585 case set_default: 565 case set_default:
586 conf_set_all_new_symbols(def_default); 566 conf_set_all_new_symbols(def_default);
587 break; 567 break;
588 case ask_silent:
589 case ask_new: 568 case ask_new:
590 if (conf_silent_update())
591 exit(1);
592 break;
593 case ask_all: 569 case ask_all:
594 if (conf_update()) 570 rootEntry = &rootmenu;
595 exit(1); 571 conf(&rootmenu);
572 input_mode = ask_silent;
573 /* fall through */
574 case ask_silent:
575 /* Update until a loop caused no more changes */
576 do {
577 conf_cnt = 0;
578 check_conf(&rootmenu);
579 } while (conf_cnt);
596 break; 580 break;
597 } 581 }
598 582
599 if (conf_write(NULL)) { 583 if (sync_kconfig) {
600 fprintf(stderr, _("\n*** Error during writing of the kernel configuration.\n\n")); 584 /* silentoldconfig is used during the build so we shall update autoconf.
601 exit(1); 585 * All other commands are only used to generate a config.
602 } 586 */
603 /* ask_silent is used during the build so we shall update autoconf. 587 if (conf_get_changed() && conf_write(NULL)) {
604 * All other commands are only used to generate a config. 588 fprintf(stderr, _("\n*** Error during writing of the kernel configuration.\n\n"));
605 */ 589 exit(1);
606 if (input_mode == ask_silent && conf_write_autoconf()) { 590 }
607 fprintf(stderr, _("\n*** Error during writing of the kernel configuration.\n\n")); 591 if (conf_write_autoconf()) {
608 return 1; 592 fprintf(stderr, _("\n*** Error during update of the kernel configuration.\n\n"));
593 return 1;
594 }
595 } else {
596 if (conf_write(NULL)) {
597 fprintf(stderr, _("\n*** Error during writing of the kernel configuration.\n\n"));
598 exit(1);
599 }
609 } 600 }
610 return 0; 601 return 0;
611} 602}
diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c
index df6a188b9930..b91cf241a539 100644
--- a/scripts/kconfig/confdata.c
+++ b/scripts/kconfig/confdata.c
@@ -222,8 +222,10 @@ load:
222 continue; 222 continue;
223 if (def == S_DEF_USER) { 223 if (def == S_DEF_USER) {
224 sym = sym_find(line + 9); 224 sym = sym_find(line + 9);
225 if (!sym) 225 if (!sym) {
226 sym_add_change_count(1);
226 break; 227 break;
228 }
227 } else { 229 } else {
228 sym = sym_lookup(line + 9, 0); 230 sym = sym_lookup(line + 9, 0);
229 if (sym->type == S_UNKNOWN) 231 if (sym->type == S_UNKNOWN)
@@ -259,8 +261,10 @@ load:
259 } 261 }
260 if (def == S_DEF_USER) { 262 if (def == S_DEF_USER) {
261 sym = sym_find(line + 7); 263 sym = sym_find(line + 7);
262 if (!sym) 264 if (!sym) {
265 sym_add_change_count(1);
263 break; 266 break;
267 }
264 } else { 268 } else {
265 sym = sym_lookup(line + 7, 0); 269 sym = sym_lookup(line + 7, 0);
266 if (sym->type == S_UNKNOWN) 270 if (sym->type == S_UNKNOWN)
diff --git a/scripts/kernel-doc b/scripts/kernel-doc
index ff787e6ff8ed..44ee94d2ab76 100755
--- a/scripts/kernel-doc
+++ b/scripts/kernel-doc
@@ -781,6 +781,7 @@ sub output_struct_xml(%) {
781 print " <refsect1>\n"; 781 print " <refsect1>\n";
782 print " <title>Members</title>\n"; 782 print " <title>Members</title>\n";
783 783
784 if ($#{$args{'parameterlist'}} >= 0) {
784 print " <variablelist>\n"; 785 print " <variablelist>\n";
785 foreach $parameter (@{$args{'parameterlist'}}) { 786 foreach $parameter (@{$args{'parameterlist'}}) {
786 ($parameter =~ /^#/) && next; 787 ($parameter =~ /^#/) && next;
@@ -798,6 +799,9 @@ sub output_struct_xml(%) {
798 print " </varlistentry>\n"; 799 print " </varlistentry>\n";
799 } 800 }
800 print " </variablelist>\n"; 801 print " </variablelist>\n";
802 } else {
803 print " <para>\n None\n </para>\n";
804 }
801 print " </refsect1>\n"; 805 print " </refsect1>\n";
802 806
803 output_section_xml(@_); 807 output_section_xml(@_);
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index 418cd7dbbc93..8e0de6a5e18a 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -1986,11 +1986,13 @@ static void read_markers(const char *fname)
1986 1986
1987 mod = find_module(modname); 1987 mod = find_module(modname);
1988 if (!mod) { 1988 if (!mod) {
1989 if (is_vmlinux(modname))
1990 have_vmlinux = 1;
1991 mod = new_module(NOFAIL(strdup(modname))); 1989 mod = new_module(NOFAIL(strdup(modname)));
1992 mod->skip = 1; 1990 mod->skip = 1;
1993 } 1991 }
1992 if (is_vmlinux(modname)) {
1993 have_vmlinux = 1;
1994 mod->skip = 0;
1995 }
1994 1996
1995 if (!mod->skip) 1997 if (!mod->skip)
1996 add_marker(mod, marker, fmt); 1998 add_marker(mod, marker, fmt);