Setting tag linux-2.6-22-50
[linux-2.6.git] / linux-2.6-100-build-nonintconfig.patch
1 diff -Nurp linux-2.6.22.noarch.orig/scripts/kconfig/conf.c linux-2.6.22.noarch/scripts/kconfig/conf.c
2 --- linux-2.6.22.noarch.orig/scripts/kconfig/conf.c     2007-10-11 20:51:33.000000000 +0200
3 +++ linux-2.6.22.noarch/scripts/kconfig/conf.c  2007-10-11 20:56:30.000000000 +0200
4 @@ -21,6 +21,8 @@ enum {
5         ask_all,
6         ask_new,
7         ask_silent,
8 +       dont_ask,
9 +       dont_ask_dont_tell,
10         set_default,
11         set_yes,
12         set_mod,
13 @@ -37,6 +39,8 @@ static struct menu *rootEntry;
14  
15  static char nohelp_text[] = N_("Sorry, no help available for this option yet.\n");
16  
17 +static int return_value = 0;
18 +
19  static void strip(char *str)
20  {
21         char *p = str;
22 @@ -103,6 +107,13 @@ static int conf_askvalue(struct symbol *
23                 fflush(stdout);
24                 fgets(line, 128, stdin);
25                 return 1;
26 +       case dont_ask:
27 +               if (!sym_has_value(sym)) {
28 +                       fprintf(stderr, "CONFIG_%s\n", sym->name);
29 +                       return_value++;
30 +               }
31 +       case dont_ask_dont_tell:
32 +               return 1;
33         case set_default:
34                 printf("%s\n", def);
35                 return 1;
36 @@ -349,6 +360,11 @@ static int conf_choice(struct menu *menu
37                         printf("?");
38                 printf("]: ");
39                 switch (input_mode) {
40 +               case dont_ask:
41 +               case dont_ask_dont_tell:
42 +                       cnt = def;
43 +                       printf("%d\n", cnt);
44 +                       break;
45                 case ask_new:
46                 case ask_silent:
47                         if (!is_new) {
48 @@ -485,6 +501,10 @@ static void check_conf(struct menu *menu
49                         if (!conf_cnt++)
50                                 printf(_("*\n* Restart config...\n*\n"));
51                         rootEntry = menu_get_parent_menu(menu);
52 +                       if (input_mode == dont_ask
53 +                           || input_mode == dont_ask_dont_tell)
54 +                               fprintf(stderr,"CONFIG_%s\n",sym->name);
55 +                       else
56                         conf(rootEntry);
57                 }
58         }
59 @@ -504,6 +524,12 @@ int main(int ac, char **av)
60                 case 'o':
61                         input_mode = ask_new;
62                         break;
63 +               case 'b':
64 +                       input_mode = dont_ask;
65 +                       break;
66 +               case 'B':
67 +                       input_mode = dont_ask_dont_tell;
68 +                       break;
69                 case 's':
70                         input_mode = ask_silent;
71                         valid_stdin = isatty(0) && isatty(1) && isatty(2);
72 @@ -570,6 +596,8 @@ int main(int ac, char **av)
73                 }
74         case ask_all:
75         case ask_new:
76 +       case dont_ask:
77 +       case dont_ask_dont_tell:
78                 conf_read(NULL);
79                 break;
80         case set_no:
81 @@ -616,7 +644,8 @@ int main(int ac, char **av)
82         do {
83                 conf_cnt = 0;
84                 check_conf(&rootmenu);
85 -       } while (conf_cnt);
86 +       } while (conf_cnt && (input_mode != dont_ask
87 +                             && input_mode != dont_ask_dont_tell));
88         if (conf_write(NULL)) {
89                 fprintf(stderr, _("\n*** Error during writing of the kernel configuration.\n\n"));
90                 return 1;
91 @@ -627,5 +656,5 @@ skip_check:
92                 return 1;
93         }
94  
95 -       return 0;
96 +       return return_value;
97  }
98 diff -Nurp linux-2.6.22.noarch.orig/scripts/kconfig/Makefile linux-2.6.22.noarch/scripts/kconfig/Makefile
99 --- linux-2.6.22.noarch.orig/scripts/kconfig/Makefile   2007-07-09 01:32:17.000000000 +0200
100 +++ linux-2.6.22.noarch/scripts/kconfig/Makefile        2007-10-11 20:52:11.000000000 +0200
101 @@ -22,6 +22,11 @@ oldconfig: $(obj)/conf
102  silentoldconfig: $(obj)/conf
103         $< -s arch/$(ARCH)/Kconfig
104  
105 +nonint_oldconfig: $(obj)/conf
106 +       $< -b arch/$(ARCH)/Kconfig
107 +loose_nonint_oldconfig: $(obj)/conf
108 +       $< -B arch/$(ARCH)/Kconfig
109 +
110  update-po-config: $(obj)/kxgettext
111         xgettext --default-domain=linux \
112            --add-comments --keyword=_ --keyword=N_ \