aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/Makefile.dtbinst2
-rw-r--r--scripts/Makefile.fwinst2
-rw-r--r--scripts/coccinelle/misc/bugon.cocci2
-rw-r--r--scripts/kallsyms.c29
-rw-r--r--scripts/kconfig/Makefile80
-rw-r--r--scripts/kconfig/conf.c8
-rw-r--r--scripts/kconfig/confdata.c5
-rw-r--r--scripts/kconfig/expr.c22
-rw-r--r--scripts/kconfig/expr.h5
-rw-r--r--scripts/kconfig/gconf.c29
-rw-r--r--scripts/kconfig/lkc.h14
-rw-r--r--scripts/kconfig/lkc_proto.h85
-rw-r--r--scripts/kconfig/mconf.c31
-rw-r--r--scripts/kconfig/menu.c4
-rwxr-xr-xscripts/kconfig/merge_config.sh27
-rw-r--r--scripts/kconfig/nconf.c5
-rw-r--r--scripts/kconfig/qconf.cc5
-rw-r--r--scripts/kconfig/symbol.c42
-rw-r--r--scripts/kconfig/util.c10
19 files changed, 197 insertions, 210 deletions
diff --git a/scripts/Makefile.dtbinst b/scripts/Makefile.dtbinst
index 909ed7a2ac61..1c15717e0d56 100644
--- a/scripts/Makefile.dtbinst
+++ b/scripts/Makefile.dtbinst
@@ -18,7 +18,7 @@ export dtbinst-root ?= $(obj)
18 18
19include include/config/auto.conf 19include include/config/auto.conf
20include scripts/Kbuild.include 20include scripts/Kbuild.include
21include $(srctree)/$(obj)/Makefile 21include $(src)/Makefile
22 22
23PHONY += __dtbs_install_prep 23PHONY += __dtbs_install_prep
24__dtbs_install_prep: 24__dtbs_install_prep:
diff --git a/scripts/Makefile.fwinst b/scripts/Makefile.fwinst
index 5b698add4f31..b27290035253 100644
--- a/scripts/Makefile.fwinst
+++ b/scripts/Makefile.fwinst
@@ -13,7 +13,7 @@ src := $(obj)
13-include $(objtree)/.config 13-include $(objtree)/.config
14 14
15include scripts/Kbuild.include 15include scripts/Kbuild.include
16include $(srctree)/$(obj)/Makefile 16include $(src)/Makefile
17 17
18include scripts/Makefile.host 18include scripts/Makefile.host
19 19
diff --git a/scripts/coccinelle/misc/bugon.cocci b/scripts/coccinelle/misc/bugon.cocci
index 3b7eec24fb5a..27c97f1f2767 100644
--- a/scripts/coccinelle/misc/bugon.cocci
+++ b/scripts/coccinelle/misc/bugon.cocci
@@ -57,6 +57,6 @@ coccilib.org.print_todo(p[0], "WARNING use BUG_ON")
57p << r.p; 57p << r.p;
58@@ 58@@
59 59
60msg="WARNING: Use BUG_ON" 60msg="WARNING: Use BUG_ON instead of if condition followed by BUG.\nPlease make sure the condition has no side effects (see conditional BUG_ON definition in include/asm-generic/bug.h)"
61coccilib.report.print_report(p[0], msg) 61coccilib.report.print_report(p[0], msg)
62 62
diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c
index c6d33bd15b04..8fa81e84e295 100644
--- a/scripts/kallsyms.c
+++ b/scripts/kallsyms.c
@@ -212,15 +212,22 @@ static int symbol_valid(struct sym_entry *s)
212 "_SDA_BASE_", /* ppc */ 212 "_SDA_BASE_", /* ppc */
213 "_SDA2_BASE_", /* ppc */ 213 "_SDA2_BASE_", /* ppc */
214 NULL }; 214 NULL };
215
216 static char *special_suffixes[] = {
217 "_veneer", /* arm */
218 NULL };
219
215 int i; 220 int i;
216 int offset = 1; 221 char *sym_name = (char *)s->sym + 1;
222
217 223
218 if (s->addr < kernel_start_addr) 224 if (s->addr < kernel_start_addr)
219 return 0; 225 return 0;
220 226
221 /* skip prefix char */ 227 /* skip prefix char */
222 if (symbol_prefix_char && *(s->sym + 1) == symbol_prefix_char) 228 if (symbol_prefix_char && *sym_name == symbol_prefix_char)
223 offset++; 229 sym_name++;
230
224 231
225 /* if --all-symbols is not specified, then symbols outside the text 232 /* if --all-symbols is not specified, then symbols outside the text
226 * and inittext sections are discarded */ 233 * and inittext sections are discarded */
@@ -235,22 +242,26 @@ static int symbol_valid(struct sym_entry *s)
235 * rules. 242 * rules.
236 */ 243 */
237 if ((s->addr == text_range_text->end && 244 if ((s->addr == text_range_text->end &&
238 strcmp((char *)s->sym + offset, 245 strcmp(sym_name,
239 text_range_text->end_sym)) || 246 text_range_text->end_sym)) ||
240 (s->addr == text_range_inittext->end && 247 (s->addr == text_range_inittext->end &&
241 strcmp((char *)s->sym + offset, 248 strcmp(sym_name,
242 text_range_inittext->end_sym))) 249 text_range_inittext->end_sym)))
243 return 0; 250 return 0;
244 } 251 }
245 252
246 /* Exclude symbols which vary between passes. */ 253 /* Exclude symbols which vary between passes. */
247 if (strstr((char *)s->sym + offset, "_compiled."))
248 return 0;
249
250 for (i = 0; special_symbols[i]; i++) 254 for (i = 0; special_symbols[i]; i++)
251 if( strcmp((char *)s->sym + offset, special_symbols[i]) == 0 ) 255 if (strcmp(sym_name, special_symbols[i]) == 0)
252 return 0; 256 return 0;
253 257
258 for (i = 0; special_suffixes[i]; i++) {
259 int l = strlen(sym_name) - strlen(special_suffixes[i]);
260
261 if (l >= 0 && strcmp(sym_name + l, special_suffixes[i]) == 0)
262 return 0;
263 }
264
254 return 1; 265 return 1;
255} 266}
256 267
diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile
index 9645c0739386..d9b1fef0c67e 100644
--- a/scripts/kconfig/Makefile
+++ b/scripts/kconfig/Makefile
@@ -2,7 +2,7 @@
2# Kernel configuration targets 2# Kernel configuration targets
3# These targets are used from top-level makefile 3# These targets are used from top-level makefile
4 4
5PHONY += oldconfig xconfig gconfig menuconfig config silentoldconfig update-po-config \ 5PHONY += xconfig gconfig menuconfig config silentoldconfig update-po-config \
6 localmodconfig localyesconfig 6 localmodconfig localyesconfig
7 7
8ifdef KBUILD_KCONFIG 8ifdef KBUILD_KCONFIG
@@ -11,30 +11,31 @@ else
11Kconfig := Kconfig 11Kconfig := Kconfig
12endif 12endif
13 13
14ifeq ($(quiet),silent_)
15silent := -s
16endif
17
14# We need this, in case the user has it in its environment 18# We need this, in case the user has it in its environment
15unexport CONFIG_ 19unexport CONFIG_
16 20
17xconfig: $(obj)/qconf 21xconfig: $(obj)/qconf
18 $< $(Kconfig) 22 $< $(silent) $(Kconfig)
19 23
20gconfig: $(obj)/gconf 24gconfig: $(obj)/gconf
21 $< $(Kconfig) 25 $< $(silent) $(Kconfig)
22 26
23menuconfig: $(obj)/mconf 27menuconfig: $(obj)/mconf
24 $< $(Kconfig) 28 $< $(silent) $(Kconfig)
25 29
26config: $(obj)/conf 30config: $(obj)/conf
27 $< --oldaskconfig $(Kconfig) 31 $< $(silent) --oldaskconfig $(Kconfig)
28 32
29nconfig: $(obj)/nconf 33nconfig: $(obj)/nconf
30 $< $(Kconfig) 34 $< $(silent) $(Kconfig)
31
32oldconfig: $(obj)/conf
33 $< --$@ $(Kconfig)
34 35
35silentoldconfig: $(obj)/conf 36silentoldconfig: $(obj)/conf
36 $(Q)mkdir -p include/config include/generated 37 $(Q)mkdir -p include/config include/generated
37 $< --$@ $(Kconfig) 38 $< $(silent) --$@ $(Kconfig)
38 39
39localyesconfig localmodconfig: $(obj)/streamline_config.pl $(obj)/conf 40localyesconfig localmodconfig: $(obj)/streamline_config.pl $(obj)/conf
40 $(Q)mkdir -p include/config include/generated 41 $(Q)mkdir -p include/config include/generated
@@ -43,18 +44,18 @@ localyesconfig localmodconfig: $(obj)/streamline_config.pl $(obj)/conf
43 cmp -s .tmp.config .config || \ 44 cmp -s .tmp.config .config || \
44 (mv -f .config .config.old.1; \ 45 (mv -f .config .config.old.1; \
45 mv -f .tmp.config .config; \ 46 mv -f .tmp.config .config; \
46 $(obj)/conf --silentoldconfig $(Kconfig); \ 47 $(obj)/conf $(silent) --silentoldconfig $(Kconfig); \
47 mv -f .config.old.1 .config.old) \ 48 mv -f .config.old.1 .config.old) \
48 else \ 49 else \
49 mv -f .tmp.config .config; \ 50 mv -f .tmp.config .config; \
50 $(obj)/conf --silentoldconfig $(Kconfig); \ 51 $(obj)/conf $(silent) --silentoldconfig $(Kconfig); \
51 fi 52 fi
52 $(Q)rm -f .tmp.config 53 $(Q)rm -f .tmp.config
53 54
54# Create new linux.pot file 55# Create new linux.pot file
55# Adjust charset to UTF-8 in .po file to accept UTF-8 in Kconfig files 56# Adjust charset to UTF-8 in .po file to accept UTF-8 in Kconfig files
56update-po-config: $(obj)/kxgettext $(obj)/gconf.glade.h 57update-po-config: $(obj)/kxgettext $(obj)/gconf.glade.h
57 $(Q)echo " GEN config.pot" 58 $(Q)$(kecho) " GEN config.pot"
58 $(Q)xgettext --default-domain=linux \ 59 $(Q)xgettext --default-domain=linux \
59 --add-comments --keyword=_ --keyword=N_ \ 60 --add-comments --keyword=_ --keyword=N_ \
60 --from-code=UTF-8 \ 61 --from-code=UTF-8 \
@@ -65,61 +66,58 @@ update-po-config: $(obj)/kxgettext $(obj)/gconf.glade.h
65 $(Q)(for i in `ls $(srctree)/arch/*/Kconfig \ 66 $(Q)(for i in `ls $(srctree)/arch/*/Kconfig \
66 $(srctree)/arch/*/um/Kconfig`; \ 67 $(srctree)/arch/*/um/Kconfig`; \
67 do \ 68 do \
68 echo " GEN $$i"; \ 69 $(kecho) " GEN $$i"; \
69 $(obj)/kxgettext $$i \ 70 $(obj)/kxgettext $$i \
70 >> $(obj)/config.pot; \ 71 >> $(obj)/config.pot; \
71 done ) 72 done )
72 $(Q)echo " GEN linux.pot" 73 $(Q)$(kecho) " GEN linux.pot"
73 $(Q)msguniq --sort-by-file --to-code=UTF-8 $(obj)/config.pot \ 74 $(Q)msguniq --sort-by-file --to-code=UTF-8 $(obj)/config.pot \
74 --output $(obj)/linux.pot 75 --output $(obj)/linux.pot
75 $(Q)rm -f $(obj)/config.pot 76 $(Q)rm -f $(obj)/config.pot
76 77
77PHONY += allnoconfig allyesconfig allmodconfig alldefconfig randconfig 78# These targets map 1:1 to the commandline options of 'conf'
78 79simple-targets := oldconfig allnoconfig allyesconfig allmodconfig \
79allnoconfig allyesconfig allmodconfig alldefconfig randconfig: $(obj)/conf 80 alldefconfig randconfig listnewconfig olddefconfig
80 $< --$@ $(Kconfig) 81PHONY += $(simple-targets)
81 82
82PHONY += listnewconfig olddefconfig oldnoconfig savedefconfig defconfig 83$(simple-targets): $(obj)/conf
84 $< $(silent) --$@ $(Kconfig)
83 85
84listnewconfig olddefconfig: $(obj)/conf 86PHONY += oldnoconfig savedefconfig defconfig
85 $< --$@ $(Kconfig)
86 87
87# oldnoconfig is an alias of olddefconfig, because people already are dependent 88# oldnoconfig is an alias of olddefconfig, because people already are dependent
88# on its behavior(sets new symbols to their default value but not 'n') with the 89# on its behavior(sets new symbols to their default value but not 'n') with the
89# counter-intuitive name. 90# counter-intuitive name.
90oldnoconfig: $(obj)/conf 91oldnoconfig: olddefconfig
91 $< --olddefconfig $(Kconfig)
92 92
93savedefconfig: $(obj)/conf 93savedefconfig: $(obj)/conf
94 $< --$@=defconfig $(Kconfig) 94 $< $(silent) --$@=defconfig $(Kconfig)
95 95
96defconfig: $(obj)/conf 96defconfig: $(obj)/conf
97ifeq ($(KBUILD_DEFCONFIG),) 97ifeq ($(KBUILD_DEFCONFIG),)
98 $< --defconfig $(Kconfig) 98 $< $(silent) --defconfig $(Kconfig)
99else 99else
100 @echo "*** Default configuration is based on '$(KBUILD_DEFCONFIG)'" 100 @$(kecho) "*** Default configuration is based on '$(KBUILD_DEFCONFIG)'"
101 $(Q)$< --defconfig=arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG) $(Kconfig) 101 $(Q)$< $(silent) --defconfig=arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG) $(Kconfig)
102endif 102endif
103 103
104%_defconfig: $(obj)/conf 104%_defconfig: $(obj)/conf
105 $(Q)$< --defconfig=arch/$(SRCARCH)/configs/$@ $(Kconfig) 105 $(Q)$< $(silent) --defconfig=arch/$(SRCARCH)/configs/$@ $(Kconfig)
106 106
107configfiles=$(wildcard $(srctree)/kernel/configs/$(1).config $(srctree)/arch/$(SRCARCH)/configs/$(1).config) 107configfiles=$(wildcard $(srctree)/kernel/configs/$@ $(srctree)/arch/$(SRCARCH)/configs/$@)
108 108
109define mergeconfig 109%.config: $(obj)/conf
110$(if $(wildcard $(objtree)/.config),, $(error You need an existing .config for this target)) 110 $(if $(call configfiles),, $(error No configuration exists for this target on this architecture))
111$(if $(call configfiles,$(1)),, $(error No configuration exists for this target on this architecture)) 111 $(Q)$(CONFIG_SHELL) $(srctree)/scripts/kconfig/merge_config.sh -m .config $(configfiles)
112$(Q)$(CONFIG_SHELL) $(srctree)/scripts/kconfig/merge_config.sh -m -O $(objtree) $(objtree)/.config $(call configfiles,$(1)) 112 +$(Q)yes "" | $(MAKE) -f $(srctree)/Makefile oldconfig
113$(Q)yes "" | $(MAKE) -f $(srctree)/Makefile oldconfig
114endef
115 113
116PHONY += kvmconfig 114PHONY += kvmconfig
117kvmconfig: 115kvmconfig: kvm_guest.config
118 $(call mergeconfig,kvm_guest) 116 @:
119 117
120PHONY += tinyconfig 118PHONY += tinyconfig
121tinyconfig: allnoconfig 119tinyconfig:
122 $(call mergeconfig,tiny) 120 $(Q)$(MAKE) -f $(srctree)/Makefile allnoconfig tiny.config
123 121
124# Help text used by make help 122# Help text used by make help
125help: 123help:
@@ -221,7 +219,7 @@ $(obj)/.tmp_qtcheck: $(src)/Makefile
221 219
222# QT needs some extra effort... 220# QT needs some extra effort...
223$(obj)/.tmp_qtcheck: 221$(obj)/.tmp_qtcheck:
224 @set -e; echo " CHECK qt"; dir=""; pkg=""; \ 222 @set -e; $(kecho) " CHECK qt"; dir=""; pkg=""; \
225 if ! pkg-config --exists QtCore 2> /dev/null; then \ 223 if ! pkg-config --exists QtCore 2> /dev/null; then \
226 echo "* Unable to find the QT4 tool qmake. Trying to use QT3"; \ 224 echo "* Unable to find the QT4 tool qmake. Trying to use QT3"; \
227 pkg-config --exists qt 2> /dev/null && pkg=qt; \ 225 pkg-config --exists qt 2> /dev/null && pkg=qt; \
diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c
index fef75fc756f4..6c204318bc94 100644
--- a/scripts/kconfig/conf.c
+++ b/scripts/kconfig/conf.c
@@ -471,7 +471,7 @@ static struct option long_opts[] = {
471static void conf_usage(const char *progname) 471static void conf_usage(const char *progname)
472{ 472{
473 473
474 printf("Usage: %s [option] <kconfig-file>\n", progname); 474 printf("Usage: %s [-s] [option] <kconfig-file>\n", progname);
475 printf("[option] is _one_ of the following:\n"); 475 printf("[option] is _one_ of the following:\n");
476 printf(" --listnewconfig List new options\n"); 476 printf(" --listnewconfig List new options\n");
477 printf(" --oldaskconfig Start a new configuration using a line-oriented program\n"); 477 printf(" --oldaskconfig Start a new configuration using a line-oriented program\n");
@@ -501,7 +501,11 @@ int main(int ac, char **av)
501 501
502 tty_stdio = isatty(0) && isatty(1) && isatty(2); 502 tty_stdio = isatty(0) && isatty(1) && isatty(2);
503 503
504 while ((opt = getopt_long(ac, av, "", long_opts, NULL)) != -1) { 504 while ((opt = getopt_long(ac, av, "s", long_opts, NULL)) != -1) {
505 if (opt == 's') {
506 conf_set_message_callback(NULL);
507 continue;
508 }
505 input_mode = (enum input_mode)opt; 509 input_mode = (enum input_mode)opt;
506 switch (opt) { 510 switch (opt) {
507 case silentoldconfig: 511 case silentoldconfig:
diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c
index 28df18dd1147..c814f57672fc 100644
--- a/scripts/kconfig/confdata.c
+++ b/scripts/kconfig/confdata.c
@@ -16,6 +16,11 @@
16 16
17#include "lkc.h" 17#include "lkc.h"
18 18
19struct conf_printer {
20 void (*print_symbol)(FILE *, struct symbol *, const char *, void *);
21 void (*print_comment)(FILE *, const char *, void *);
22};
23
19static void conf_warning(const char *fmt, ...) 24static void conf_warning(const char *fmt, ...)
20 __attribute__ ((format (printf, 1, 2))); 25 __attribute__ ((format (printf, 1, 2)));
21 26
diff --git a/scripts/kconfig/expr.c b/scripts/kconfig/expr.c
index d6626521f9b9..fb0a2a286dca 100644
--- a/scripts/kconfig/expr.c
+++ b/scripts/kconfig/expr.c
@@ -11,6 +11,12 @@
11 11
12#define DEBUG_EXPR 0 12#define DEBUG_EXPR 0
13 13
14static int expr_eq(struct expr *e1, struct expr *e2);
15static struct expr *expr_eliminate_yn(struct expr *e);
16static struct expr *expr_extract_eq_and(struct expr **ep1, struct expr **ep2);
17static struct expr *expr_extract_eq_or(struct expr **ep1, struct expr **ep2);
18static void expr_extract_eq(enum expr_type type, struct expr **ep, struct expr **ep1, struct expr **ep2);
19
14struct expr *expr_alloc_symbol(struct symbol *sym) 20struct expr *expr_alloc_symbol(struct symbol *sym)
15{ 21{
16 struct expr *e = xcalloc(1, sizeof(*e)); 22 struct expr *e = xcalloc(1, sizeof(*e));
@@ -186,7 +192,7 @@ void expr_eliminate_eq(struct expr **ep1, struct expr **ep2)
186#undef e1 192#undef e1
187#undef e2 193#undef e2
188 194
189int expr_eq(struct expr *e1, struct expr *e2) 195static int expr_eq(struct expr *e1, struct expr *e2)
190{ 196{
191 int res, old_count; 197 int res, old_count;
192 198
@@ -228,7 +234,7 @@ int expr_eq(struct expr *e1, struct expr *e2)
228 return 0; 234 return 0;
229} 235}
230 236
231struct expr *expr_eliminate_yn(struct expr *e) 237static struct expr *expr_eliminate_yn(struct expr *e)
232{ 238{
233 struct expr *tmp; 239 struct expr *tmp;
234 240
@@ -823,7 +829,7 @@ bool expr_depends_symbol(struct expr *dep, struct symbol *sym)
823 return false; 829 return false;
824} 830}
825 831
826struct expr *expr_extract_eq_and(struct expr **ep1, struct expr **ep2) 832static struct expr *expr_extract_eq_and(struct expr **ep1, struct expr **ep2)
827{ 833{
828 struct expr *tmp = NULL; 834 struct expr *tmp = NULL;
829 expr_extract_eq(E_AND, &tmp, ep1, ep2); 835 expr_extract_eq(E_AND, &tmp, ep1, ep2);
@@ -834,7 +840,7 @@ struct expr *expr_extract_eq_and(struct expr **ep1, struct expr **ep2)
834 return tmp; 840 return tmp;
835} 841}
836 842
837struct expr *expr_extract_eq_or(struct expr **ep1, struct expr **ep2) 843static struct expr *expr_extract_eq_or(struct expr **ep1, struct expr **ep2)
838{ 844{
839 struct expr *tmp = NULL; 845 struct expr *tmp = NULL;
840 expr_extract_eq(E_OR, &tmp, ep1, ep2); 846 expr_extract_eq(E_OR, &tmp, ep1, ep2);
@@ -845,7 +851,7 @@ struct expr *expr_extract_eq_or(struct expr **ep1, struct expr **ep2)
845 return tmp; 851 return tmp;
846} 852}
847 853
848void expr_extract_eq(enum expr_type type, struct expr **ep, struct expr **ep1, struct expr **ep2) 854static void expr_extract_eq(enum expr_type type, struct expr **ep, struct expr **ep1, struct expr **ep2)
849{ 855{
850#define e1 (*ep1) 856#define e1 (*ep1)
851#define e2 (*ep2) 857#define e2 (*ep2)
@@ -976,11 +982,8 @@ tristate expr_calc_value(struct expr *e)
976 } 982 }
977} 983}
978 984
979int expr_compare_type(enum expr_type t1, enum expr_type t2) 985static int expr_compare_type(enum expr_type t1, enum expr_type t2)
980{ 986{
981#if 0
982 return 1;
983#else
984 if (t1 == t2) 987 if (t1 == t2)
985 return 0; 988 return 0;
986 switch (t1) { 989 switch (t1) {
@@ -1005,7 +1008,6 @@ int expr_compare_type(enum expr_type t1, enum expr_type t2)
1005 } 1008 }
1006 printf("[%dgt%d?]", t1, t2); 1009 printf("[%dgt%d?]", t1, t2);
1007 return 0; 1010 return 0;
1008#endif
1009} 1011}
1010 1012
1011static inline struct expr * 1013static inline struct expr *
diff --git a/scripts/kconfig/expr.h b/scripts/kconfig/expr.h
index 412ea8a2abb8..a2fc96a2bd2c 100644
--- a/scripts/kconfig/expr.h
+++ b/scripts/kconfig/expr.h
@@ -205,18 +205,13 @@ struct expr *expr_alloc_and(struct expr *e1, struct expr *e2);
205struct expr *expr_alloc_or(struct expr *e1, struct expr *e2); 205struct expr *expr_alloc_or(struct expr *e1, struct expr *e2);
206struct expr *expr_copy(const struct expr *org); 206struct expr *expr_copy(const struct expr *org);
207void expr_free(struct expr *e); 207void expr_free(struct expr *e);
208int expr_eq(struct expr *e1, struct expr *e2);
209void expr_eliminate_eq(struct expr **ep1, struct expr **ep2); 208void expr_eliminate_eq(struct expr **ep1, struct expr **ep2);
210tristate expr_calc_value(struct expr *e); 209tristate expr_calc_value(struct expr *e);
211struct expr *expr_eliminate_yn(struct expr *e);
212struct expr *expr_trans_bool(struct expr *e); 210struct expr *expr_trans_bool(struct expr *e);
213struct expr *expr_eliminate_dups(struct expr *e); 211struct expr *expr_eliminate_dups(struct expr *e);
214struct expr *expr_transform(struct expr *e); 212struct expr *expr_transform(struct expr *e);
215int expr_contains_symbol(struct expr *dep, struct symbol *sym); 213int expr_contains_symbol(struct expr *dep, struct symbol *sym);
216bool expr_depends_symbol(struct expr *dep, struct symbol *sym); 214bool expr_depends_symbol(struct expr *dep, struct symbol *sym);
217struct expr *expr_extract_eq_and(struct expr **ep1, struct expr **ep2);
218struct expr *expr_extract_eq_or(struct expr **ep1, struct expr **ep2);
219void expr_extract_eq(enum expr_type type, struct expr **ep, struct expr **ep1, struct expr **ep2);
220struct expr *expr_trans_compare(struct expr *e, enum expr_type type, struct symbol *sym); 215struct expr *expr_trans_compare(struct expr *e, enum expr_type type, struct symbol *sym);
221struct expr *expr_simplify_unmet_dep(struct expr *e1, struct expr *e2); 216struct expr *expr_simplify_unmet_dep(struct expr *e1, struct expr *e2);
222 217
diff --git a/scripts/kconfig/gconf.c b/scripts/kconfig/gconf.c
index d0a35b21f308..26d208b435a0 100644
--- a/scripts/kconfig/gconf.c
+++ b/scripts/kconfig/gconf.c
@@ -169,14 +169,6 @@ void init_main_window(const gchar * glade_file)
169 style = gtk_widget_get_style(main_wnd); 169 style = gtk_widget_get_style(main_wnd);
170 widget = glade_xml_get_widget(xml, "toolbar1"); 170 widget = glade_xml_get_widget(xml, "toolbar1");
171 171
172#if 0 /* Use stock Gtk icons instead */
173 replace_button_icon(xml, main_wnd->window, style,
174 "button1", (gchar **) xpm_back);
175 replace_button_icon(xml, main_wnd->window, style,
176 "button2", (gchar **) xpm_load);
177 replace_button_icon(xml, main_wnd->window, style,
178 "button3", (gchar **) xpm_save);
179#endif
180 replace_button_icon(xml, main_wnd->window, style, 172 replace_button_icon(xml, main_wnd->window, style,
181 "button4", (gchar **) xpm_single_view); 173 "button4", (gchar **) xpm_single_view);
182 replace_button_icon(xml, main_wnd->window, style, 174 replace_button_icon(xml, main_wnd->window, style,
@@ -184,22 +176,6 @@ void init_main_window(const gchar * glade_file)
184 replace_button_icon(xml, main_wnd->window, style, 176 replace_button_icon(xml, main_wnd->window, style,
185 "button6", (gchar **) xpm_tree_view); 177 "button6", (gchar **) xpm_tree_view);
186 178
187#if 0
188 switch (view_mode) {
189 case SINGLE_VIEW:
190 widget = glade_xml_get_widget(xml, "button4");
191 g_signal_emit_by_name(widget, "clicked");
192 break;
193 case SPLIT_VIEW:
194 widget = glade_xml_get_widget(xml, "button5");
195 g_signal_emit_by_name(widget, "clicked");
196 break;
197 case FULL_VIEW:
198 widget = glade_xml_get_widget(xml, "button6");
199 g_signal_emit_by_name(widget, "clicked");
200 break;
201 }
202#endif
203 txtbuf = gtk_text_view_get_buffer(GTK_TEXT_VIEW(text_w)); 179 txtbuf = gtk_text_view_get_buffer(GTK_TEXT_VIEW(text_w));
204 tag1 = gtk_text_buffer_create_tag(txtbuf, "mytag1", 180 tag1 = gtk_text_buffer_create_tag(txtbuf, "mytag1",
205 "foreground", "red", 181 "foreground", "red",
@@ -1498,9 +1474,12 @@ int main(int ac, char *av[])
1498 case 'a': 1474 case 'a':
1499 //showAll = 1; 1475 //showAll = 1;
1500 break; 1476 break;
1477 case 's':
1478 conf_set_message_callback(NULL);
1479 break;
1501 case 'h': 1480 case 'h':
1502 case '?': 1481 case '?':
1503 printf("%s <config>\n", av[0]); 1482 printf("%s [-s] <config>\n", av[0]);
1504 exit(0); 1483 exit(0);
1505 } 1484 }
1506 name = av[2]; 1485 name = av[2];
diff --git a/scripts/kconfig/lkc.h b/scripts/kconfig/lkc.h
index d5daa7af8b49..91ca126ea080 100644
--- a/scripts/kconfig/lkc.h
+++ b/scripts/kconfig/lkc.h
@@ -21,9 +21,7 @@ static inline char *bind_textdomain_codeset(const char *dn, char *c) { return c;
21extern "C" { 21extern "C" {
22#endif 22#endif
23 23
24#define P(name,type,arg) extern type name arg
25#include "lkc_proto.h" 24#include "lkc_proto.h"
26#undef P
27 25
28#define SRCTREE "srctree" 26#define SRCTREE "srctree"
29 27
@@ -70,9 +68,6 @@ struct kconf_id {
70 enum symbol_type stype; 68 enum symbol_type stype;
71}; 69};
72 70
73extern int zconfdebug;
74
75int zconfparse(void);
76void zconfdump(FILE *out); 71void zconfdump(FILE *out);
77void zconf_starthelp(void); 72void zconf_starthelp(void);
78FILE *zconf_fopen(const char *name); 73FILE *zconf_fopen(const char *name);
@@ -90,11 +85,6 @@ void sym_add_change_count(int count);
90bool conf_set_all_new_symbols(enum conf_def_mode mode); 85bool conf_set_all_new_symbols(enum conf_def_mode mode);
91void set_all_choice_values(struct symbol *csym); 86void set_all_choice_values(struct symbol *csym);
92 87
93struct conf_printer {
94 void (*print_symbol)(FILE *, struct symbol *, const char *, void *);
95 void (*print_comment)(FILE *, const char *, void *);
96};
97
98/* confdata.c and expr.c */ 88/* confdata.c and expr.c */
99static inline void xfwrite(const void *str, size_t len, size_t count, FILE *out) 89static inline void xfwrite(const void *str, size_t len, size_t count, FILE *out)
100{ 90{
@@ -113,7 +103,6 @@ void menu_add_entry(struct symbol *sym);
113void menu_end_entry(void); 103void menu_end_entry(void);
114void menu_add_dep(struct expr *dep); 104void menu_add_dep(struct expr *dep);
115void menu_add_visibility(struct expr *dep); 105void menu_add_visibility(struct expr *dep);
116struct property *menu_add_prop(enum prop_type type, char *prompt, struct expr *expr, struct expr *dep);
117struct property *menu_add_prompt(enum prop_type type, char *prompt, struct expr *dep); 106struct property *menu_add_prompt(enum prop_type type, char *prompt, struct expr *dep);
118void menu_add_expr(enum prop_type type, struct expr *expr, struct expr *dep); 107void menu_add_expr(enum prop_type type, struct expr *expr, struct expr *dep);
119void menu_add_symbol(enum prop_type type, struct symbol *sym, struct expr *dep); 108void menu_add_symbol(enum prop_type type, struct symbol *sym, struct expr *dep);
@@ -137,7 +126,6 @@ struct gstr {
137 int max_width; 126 int max_width;
138}; 127};
139struct gstr str_new(void); 128struct gstr str_new(void);
140struct gstr str_assign(const char *s);
141void str_free(struct gstr *gs); 129void str_free(struct gstr *gs);
142void str_append(struct gstr *gs, const char *s); 130void str_append(struct gstr *gs, const char *s);
143void str_printf(struct gstr *gs, const char *fmt, ...); 131void str_printf(struct gstr *gs, const char *fmt, ...);
@@ -148,8 +136,6 @@ extern struct expr *sym_env_list;
148 136
149void sym_init(void); 137void sym_init(void);
150void sym_clear_all_valid(void); 138void sym_clear_all_valid(void);
151void sym_set_all_changed(void);
152void sym_set_changed(struct symbol *sym);
153struct symbol *sym_choice_default(struct symbol *sym); 139struct symbol *sym_choice_default(struct symbol *sym);
154const char *sym_get_string_default(struct symbol *sym); 140const char *sym_get_string_default(struct symbol *sym);
155struct symbol *sym_check_deps(struct symbol *sym); 141struct symbol *sym_check_deps(struct symbol *sym);
diff --git a/scripts/kconfig/lkc_proto.h b/scripts/kconfig/lkc_proto.h
index ecdb9659b67d..d5398718ec2a 100644
--- a/scripts/kconfig/lkc_proto.h
+++ b/scripts/kconfig/lkc_proto.h
@@ -1,57 +1,52 @@
1#include <stdarg.h> 1#include <stdarg.h>
2 2
3/* confdata.c */ 3/* confdata.c */
4P(conf_parse,void,(const char *name)); 4void conf_parse(const char *name);
5P(conf_read,int,(const char *name)); 5int conf_read(const char *name);
6P(conf_read_simple,int,(const char *name, int)); 6int conf_read_simple(const char *name, int);
7P(conf_write_defconfig,int,(const char *name)); 7int conf_write_defconfig(const char *name);
8P(conf_write,int,(const char *name)); 8int conf_write(const char *name);
9P(conf_write_autoconf,int,(void)); 9int conf_write_autoconf(void);
10P(conf_get_changed,bool,(void)); 10bool conf_get_changed(void);
11P(conf_set_changed_callback, void,(void (*fn)(void))); 11void conf_set_changed_callback(void (*fn)(void));
12P(conf_set_message_callback, void,(void (*fn)(const char *fmt, va_list ap))); 12void conf_set_message_callback(void (*fn)(const char *fmt, va_list ap));
13 13
14/* menu.c */ 14/* menu.c */
15P(rootmenu,struct menu,); 15extern struct menu rootmenu;
16 16
17P(menu_is_empty, bool, (struct menu *menu)); 17bool menu_is_empty(struct menu *menu);
18P(menu_is_visible, bool, (struct menu *menu)); 18bool menu_is_visible(struct menu *menu);
19P(menu_has_prompt, bool, (struct menu *menu)); 19bool menu_has_prompt(struct menu *menu);
20P(menu_get_prompt,const char *,(struct menu *menu)); 20const char * menu_get_prompt(struct menu *menu);
21P(menu_get_root_menu,struct menu *,(struct menu *menu)); 21struct menu * menu_get_root_menu(struct menu *menu);
22P(menu_get_parent_menu,struct menu *,(struct menu *menu)); 22struct menu * menu_get_parent_menu(struct menu *menu);
23P(menu_has_help,bool,(struct menu *menu)); 23bool menu_has_help(struct menu *menu);
24P(menu_get_help,const char *,(struct menu *menu)); 24const char * menu_get_help(struct menu *menu);
25P(get_symbol_str, void, (struct gstr *r, struct symbol *sym, struct list_head 25struct gstr get_relations_str(struct symbol **sym_arr, struct list_head *head);
26 *head)); 26void menu_get_ext_help(struct menu *menu, struct gstr *help);
27P(get_relations_str, struct gstr, (struct symbol **sym_arr, struct list_head
28 *head));
29P(menu_get_ext_help,void,(struct menu *menu, struct gstr *help));
30 27
31/* symbol.c */ 28/* symbol.c */
32P(symbol_hash,struct symbol *,[SYMBOL_HASHSIZE]); 29extern struct symbol * symbol_hash[SYMBOL_HASHSIZE];
33 30
34P(sym_lookup,struct symbol *,(const char *name, int flags)); 31struct symbol * sym_lookup(const char *name, int flags);
35P(sym_find,struct symbol *,(const char *name)); 32struct symbol * sym_find(const char *name);
36P(sym_expand_string_value,const char *,(const char *in)); 33const char * sym_expand_string_value(const char *in);
37P(sym_escape_string_value, const char *,(const char *in)); 34const char * sym_escape_string_value(const char *in);
38P(sym_re_search,struct symbol **,(const char *pattern)); 35struct symbol ** sym_re_search(const char *pattern);
39P(sym_type_name,const char *,(enum symbol_type type)); 36const char * sym_type_name(enum symbol_type type);
40P(sym_calc_value,void,(struct symbol *sym)); 37void sym_calc_value(struct symbol *sym);
41P(sym_get_type,enum symbol_type,(struct symbol *sym)); 38enum symbol_type sym_get_type(struct symbol *sym);
42P(sym_tristate_within_range,bool,(struct symbol *sym,tristate tri)); 39bool sym_tristate_within_range(struct symbol *sym,tristate tri);
43P(sym_set_tristate_value,bool,(struct symbol *sym,tristate tri)); 40bool sym_set_tristate_value(struct symbol *sym,tristate tri);
44P(sym_toggle_tristate_value,tristate,(struct symbol *sym)); 41tristate sym_toggle_tristate_value(struct symbol *sym);
45P(sym_string_valid,bool,(struct symbol *sym, const char *newval)); 42bool sym_string_valid(struct symbol *sym, const char *newval);
46P(sym_string_within_range,bool,(struct symbol *sym, const char *str)); 43bool sym_string_within_range(struct symbol *sym, const char *str);
47P(sym_set_string_value,bool,(struct symbol *sym, const char *newval)); 44bool sym_set_string_value(struct symbol *sym, const char *newval);
48P(sym_is_changable,bool,(struct symbol *sym)); 45bool sym_is_changable(struct symbol *sym);
49P(sym_get_choice_prop,struct property *,(struct symbol *sym)); 46struct property * sym_get_choice_prop(struct symbol *sym);
50P(sym_get_default_prop,struct property *,(struct symbol *sym)); 47const char * sym_get_string_value(struct symbol *sym);
51P(sym_get_string_value,const char *,(struct symbol *sym));
52 48
53P(prop_get_type_name,const char *,(enum prop_type type)); 49const char * prop_get_type_name(enum prop_type type);
54 50
55/* expr.c */ 51/* expr.c */
56P(expr_compare_type,int,(enum expr_type t1, enum expr_type t2)); 52void expr_print(struct expr *e, void (*fn)(void *, struct symbol *, const char *), void *data, int prevtoken);
57P(expr_print,void,(struct expr *e, void (*fn)(void *, struct symbol *, const char *), void *data, int prevtoken));
diff --git a/scripts/kconfig/mconf.c b/scripts/kconfig/mconf.c
index 4dd37552abc2..315ce2c7cb9d 100644
--- a/scripts/kconfig/mconf.c
+++ b/scripts/kconfig/mconf.c
@@ -279,6 +279,7 @@ static int child_count;
279static int single_menu_mode; 279static int single_menu_mode;
280static int show_all_options; 280static int show_all_options;
281static int save_and_exit; 281static int save_and_exit;
282static int silent;
282 283
283static void conf(struct menu *menu, struct menu *active_menu); 284static void conf(struct menu *menu, struct menu *active_menu);
284static void conf_choice(struct menu *menu); 285static void conf_choice(struct menu *menu);
@@ -777,10 +778,12 @@ static void conf_message_callback(const char *fmt, va_list ap)
777 char buf[PATH_MAX+1]; 778 char buf[PATH_MAX+1];
778 779
779 vsnprintf(buf, sizeof(buf), fmt, ap); 780 vsnprintf(buf, sizeof(buf), fmt, ap);
780 if (save_and_exit) 781 if (save_and_exit) {
781 printf("%s", buf); 782 if (!silent)
782 else 783 printf("%s", buf);
784 } else {
783 show_textbox(NULL, buf, 6, 60); 785 show_textbox(NULL, buf, 6, 60);
786 }
784} 787}
785 788
786static void show_help(struct menu *menu) 789static void show_help(struct menu *menu)
@@ -977,16 +980,18 @@ static int handle_exit(void)
977 } 980 }
978 /* fall through */ 981 /* fall through */
979 case -1: 982 case -1:
980 printf(_("\n\n" 983 if (!silent)
981 "*** End of the configuration.\n" 984 printf(_("\n\n"
982 "*** Execute 'make' to start the build or try 'make help'." 985 "*** End of the configuration.\n"
983 "\n\n")); 986 "*** Execute 'make' to start the build or try 'make help'."
987 "\n\n"));
984 res = 0; 988 res = 0;
985 break; 989 break;
986 default: 990 default:
987 fprintf(stderr, _("\n\n" 991 if (!silent)
988 "Your configuration changes were NOT saved." 992 fprintf(stderr, _("\n\n"
989 "\n\n")); 993 "Your configuration changes were NOT saved."
994 "\n\n"));
990 if (res != KEY_ESC) 995 if (res != KEY_ESC)
991 res = 0; 996 res = 0;
992 } 997 }
@@ -1010,6 +1015,12 @@ int main(int ac, char **av)
1010 1015
1011 signal(SIGINT, sig_handler); 1016 signal(SIGINT, sig_handler);
1012 1017
1018 if (ac > 1 && strcmp(av[1], "-s") == 0) {
1019 silent = 1;
1020 /* Silence conf_read() until the real callback is set up */
1021 conf_set_message_callback(NULL);
1022 av++;
1023 }
1013 conf_parse(av[1]); 1024 conf_parse(av[1]);
1014 conf_read(NULL); 1025 conf_read(NULL);
1015 1026
diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c
index 72c9dba84c5d..b05cc3d4a9be 100644
--- a/scripts/kconfig/menu.c
+++ b/scripts/kconfig/menu.c
@@ -125,7 +125,7 @@ void menu_set_type(int type)
125 sym_type_name(sym->type), sym_type_name(type)); 125 sym_type_name(sym->type), sym_type_name(type));
126} 126}
127 127
128struct property *menu_add_prop(enum prop_type type, char *prompt, struct expr *expr, struct expr *dep) 128static struct property *menu_add_prop(enum prop_type type, char *prompt, struct expr *expr, struct expr *dep)
129{ 129{
130 struct property *prop = prop_alloc(type, current_entry->sym); 130 struct property *prop = prop_alloc(type, current_entry->sym);
131 131
@@ -615,7 +615,7 @@ static struct property *get_symbol_prop(struct symbol *sym)
615/* 615/*
616 * head is optional and may be NULL 616 * head is optional and may be NULL
617 */ 617 */
618void get_symbol_str(struct gstr *r, struct symbol *sym, 618static void get_symbol_str(struct gstr *r, struct symbol *sym,
619 struct list_head *head) 619 struct list_head *head)
620{ 620{
621 bool hit; 621 bool hit;
diff --git a/scripts/kconfig/merge_config.sh b/scripts/kconfig/merge_config.sh
index 2ab91b9b100d..ec8e20350a64 100755
--- a/scripts/kconfig/merge_config.sh
+++ b/scripts/kconfig/merge_config.sh
@@ -35,7 +35,7 @@ usage() {
35 echo " -O dir to put generated output files" 35 echo " -O dir to put generated output files"
36} 36}
37 37
38MAKE=true 38RUNMAKE=true
39ALLTARGET=alldefconfig 39ALLTARGET=alldefconfig
40WARNREDUN=false 40WARNREDUN=false
41OUTPUT=. 41OUTPUT=.
@@ -48,7 +48,7 @@ while true; do
48 continue 48 continue
49 ;; 49 ;;
50 "-m") 50 "-m")
51 MAKE=false 51 RUNMAKE=false
52 shift 52 shift
53 continue 53 continue
54 ;; 54 ;;
@@ -85,6 +85,11 @@ fi
85INITFILE=$1 85INITFILE=$1
86shift; 86shift;
87 87
88if [ ! -r "$INITFILE" ]; then
89 echo "The base file '$INITFILE' does not exist. Exit." >&2
90 exit 1
91fi
92
88MERGE_LIST=$* 93MERGE_LIST=$*
89SED_CONFIG_EXP="s/^\(# \)\{0,1\}\(CONFIG_[a-zA-Z0-9_]*\)[= ].*/\2/p" 94SED_CONFIG_EXP="s/^\(# \)\{0,1\}\(CONFIG_[a-zA-Z0-9_]*\)[= ].*/\2/p"
90TMP_FILE=$(mktemp ./.tmp.config.XXXXXXXXXX) 95TMP_FILE=$(mktemp ./.tmp.config.XXXXXXXXXX)
@@ -92,31 +97,29 @@ TMP_FILE=$(mktemp ./.tmp.config.XXXXXXXXXX)
92echo "Using $INITFILE as base" 97echo "Using $INITFILE as base"
93cat $INITFILE > $TMP_FILE 98cat $INITFILE > $TMP_FILE
94 99
95# Merge files, printing warnings on overrided values 100# Merge files, printing warnings on overridden values
96for MERGE_FILE in $MERGE_LIST ; do 101for MERGE_FILE in $MERGE_LIST ; do
97 echo "Merging $MERGE_FILE" 102 echo "Merging $MERGE_FILE"
98 CFG_LIST=$(sed -n "$SED_CONFIG_EXP" $MERGE_FILE) 103 CFG_LIST=$(sed -n "$SED_CONFIG_EXP" $MERGE_FILE)
99 104
100 for CFG in $CFG_LIST ; do 105 for CFG in $CFG_LIST ; do
101 grep -q -w $CFG $TMP_FILE 106 grep -q -w $CFG $TMP_FILE || continue
102 if [ $? -eq 0 ] ; then 107 PREV_VAL=$(grep -w $CFG $TMP_FILE)
103 PREV_VAL=$(grep -w $CFG $TMP_FILE) 108 NEW_VAL=$(grep -w $CFG $MERGE_FILE)
104 NEW_VAL=$(grep -w $CFG $MERGE_FILE) 109 if [ "x$PREV_VAL" != "x$NEW_VAL" ] ; then
105 if [ "x$PREV_VAL" != "x$NEW_VAL" ] ; then
106 echo Value of $CFG is redefined by fragment $MERGE_FILE: 110 echo Value of $CFG is redefined by fragment $MERGE_FILE:
107 echo Previous value: $PREV_VAL 111 echo Previous value: $PREV_VAL
108 echo New value: $NEW_VAL 112 echo New value: $NEW_VAL
109 echo 113 echo
110 elif [ "$WARNREDUN" = "true" ]; then 114 elif [ "$WARNREDUN" = "true" ]; then
111 echo Value of $CFG is redundant by fragment $MERGE_FILE: 115 echo Value of $CFG is redundant by fragment $MERGE_FILE:
112 fi
113 sed -i "/$CFG[ =]/d" $TMP_FILE
114 fi 116 fi
117 sed -i "/$CFG[ =]/d" $TMP_FILE
115 done 118 done
116 cat $MERGE_FILE >> $TMP_FILE 119 cat $MERGE_FILE >> $TMP_FILE
117done 120done
118 121
119if [ "$MAKE" = "false" ]; then 122if [ "$RUNMAKE" = "false" ]; then
120 cp $TMP_FILE $OUTPUT/.config 123 cp $TMP_FILE $OUTPUT/.config
121 echo "#" 124 echo "#"
122 echo "# merged configuration written to $OUTPUT/.config (needs make)" 125 echo "# merged configuration written to $OUTPUT/.config (needs make)"
diff --git a/scripts/kconfig/nconf.c b/scripts/kconfig/nconf.c
index 984489ef2b46..d42d534a66cd 100644
--- a/scripts/kconfig/nconf.c
+++ b/scripts/kconfig/nconf.c
@@ -1482,6 +1482,11 @@ int main(int ac, char **av)
1482 bindtextdomain(PACKAGE, LOCALEDIR); 1482 bindtextdomain(PACKAGE, LOCALEDIR);
1483 textdomain(PACKAGE); 1483 textdomain(PACKAGE);
1484 1484
1485 if (ac > 1 && strcmp(av[1], "-s") == 0) {
1486 /* Silence conf_read() until the real callback is set up */
1487 conf_set_message_callback(NULL);
1488 av++;
1489 }
1485 conf_parse(av[1]); 1490 conf_parse(av[1]);
1486 conf_read(NULL); 1491 conf_read(NULL);
1487 1492
diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc
index 9d3b04b0769c..c3bb7fe8dfa6 100644
--- a/scripts/kconfig/qconf.cc
+++ b/scripts/kconfig/qconf.cc
@@ -1746,7 +1746,7 @@ static const char *progname;
1746 1746
1747static void usage(void) 1747static void usage(void)
1748{ 1748{
1749 printf(_("%s <config>\n"), progname); 1749 printf(_("%s [-s] <config>\n"), progname);
1750 exit(0); 1750 exit(0);
1751} 1751}
1752 1752
@@ -1762,6 +1762,9 @@ int main(int ac, char** av)
1762 configApp = new QApplication(ac, av); 1762 configApp = new QApplication(ac, av);
1763 if (ac > 1 && av[1][0] == '-') { 1763 if (ac > 1 && av[1][0] == '-') {
1764 switch (av[1][1]) { 1764 switch (av[1][1]) {
1765 case 's':
1766 conf_set_message_callback(NULL);
1767 break;
1765 case 'h': 1768 case 'h':
1766 case '?': 1769 case '?':
1767 usage(); 1770 usage();
diff --git a/scripts/kconfig/symbol.c b/scripts/kconfig/symbol.c
index 7caabdb51c64..6731377f9bb2 100644
--- a/scripts/kconfig/symbol.c
+++ b/scripts/kconfig/symbol.c
@@ -112,7 +112,7 @@ struct property *sym_get_env_prop(struct symbol *sym)
112 return NULL; 112 return NULL;
113} 113}
114 114
115struct property *sym_get_default_prop(struct symbol *sym) 115static struct property *sym_get_default_prop(struct symbol *sym)
116{ 116{
117 struct property *prop; 117 struct property *prop;
118 118
@@ -186,6 +186,26 @@ static void sym_validate_range(struct symbol *sym)
186 sym->curr.val = strdup(str); 186 sym->curr.val = strdup(str);
187} 187}
188 188
189static void sym_set_changed(struct symbol *sym)
190{
191 struct property *prop;
192
193 sym->flags |= SYMBOL_CHANGED;
194 for (prop = sym->prop; prop; prop = prop->next) {
195 if (prop->menu)
196 prop->menu->flags |= MENU_CHANGED;
197 }
198}
199
200static void sym_set_all_changed(void)
201{
202 struct symbol *sym;
203 int i;
204
205 for_all_symbols(i, sym)
206 sym_set_changed(sym);
207}
208
189static void sym_calc_visibility(struct symbol *sym) 209static void sym_calc_visibility(struct symbol *sym)
190{ 210{
191 struct property *prop; 211 struct property *prop;
@@ -451,26 +471,6 @@ void sym_clear_all_valid(void)
451 sym_calc_value(modules_sym); 471 sym_calc_value(modules_sym);
452} 472}
453 473
454void sym_set_changed(struct symbol *sym)
455{
456 struct property *prop;
457
458 sym->flags |= SYMBOL_CHANGED;
459 for (prop = sym->prop; prop; prop = prop->next) {
460 if (prop->menu)
461 prop->menu->flags |= MENU_CHANGED;
462 }
463}
464
465void sym_set_all_changed(void)
466{
467 struct symbol *sym;
468 int i;
469
470 for_all_symbols(i, sym)
471 sym_set_changed(sym);
472}
473
474bool sym_tristate_within_range(struct symbol *sym, tristate val) 474bool sym_tristate_within_range(struct symbol *sym, tristate val)
475{ 475{
476 int type = sym_get_type(sym); 476 int type = sym_get_type(sym);
diff --git a/scripts/kconfig/util.c b/scripts/kconfig/util.c
index 94f9c83e324f..0e76042473cc 100644
--- a/scripts/kconfig/util.c
+++ b/scripts/kconfig/util.c
@@ -88,16 +88,6 @@ struct gstr str_new(void)
88 return gs; 88 return gs;
89} 89}
90 90
91/* Allocate and assign growable string */
92struct gstr str_assign(const char *s)
93{
94 struct gstr gs;
95 gs.s = strdup(s);
96 gs.len = strlen(s) + 1;
97 gs.max_width = 0;
98 return gs;
99}
100
101/* Free storage for growable string */ 91/* Free storage for growable string */
102void str_free(struct gstr *gs) 92void str_free(struct gstr *gs)
103{ 93{