diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-05-07 10:58:05 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-05-07 10:58:05 -0400 |
commit | 685e56d2943bb8bf3b641d85b1b6c69d24f7965f (patch) | |
tree | 7f3ed2dbd080264ac228c913f528e08aa14a9c97 /scripts | |
parent | 57c29bd3cdf1f82a7ba79ea227638b14f607247c (diff) | |
parent | 21ca352b71ca252e1933b1538fe89da8a04395c3 (diff) |
Merge branch 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild
Pull kconfig updates from Michal Marek:
- use pkg-config to detect curses libraries
- clean up the way curses headers are searched
- Some randconfig fixes, of which one had to be reverted
- KCONFIG_SEED for randconfig debugging
- memuconfig memory leak plugged
- menuconfig > breadcrumbs > navigation
- xconfig compilation fix
- Other minor fixes
* 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
kconfig: fix lists definition for C++
Revert "kconfig: fix randomising choice entries in presence of KCONFIG_ALLCONFIG"
kconfig: implement KCONFIG_PROBABILITY for randconfig
kconfig: allow specifying the seed for randconfig
kconfig: fix randomising choice entries in presence of KCONFIG_ALLCONFIG
kconfig: do not override symbols already set
kconfig: fix randconfig tristate detection
kconfig/lxdialog: rationalise the include paths where to find {.n}curses{,w}.h
menuconfig: Add "breadcrumbs" navigation aid
menuconfig: Fix memory leak introduced by jump keys feature
merge_config.sh: Avoid creating unnessary source softlinks
kconfig: optionally use pkg-config to detect ncurses libs
menuconfig: optionally use pkg-config to detect ncurses libs
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/kconfig/Makefile | 4 | ||||
-rw-r--r-- | scripts/kconfig/conf.c | 12 | ||||
-rw-r--r-- | scripts/kconfig/confdata.c | 59 | ||||
-rw-r--r-- | scripts/kconfig/list.h | 40 | ||||
-rw-r--r-- | scripts/kconfig/lxdialog/check-lxdialog.sh | 6 | ||||
-rw-r--r-- | scripts/kconfig/lxdialog/dialog.h | 7 | ||||
-rw-r--r-- | scripts/kconfig/lxdialog/util.c | 45 | ||||
-rw-r--r-- | scripts/kconfig/mconf.c | 74 | ||||
-rwxr-xr-x | scripts/kconfig/merge_config.sh | 10 |
9 files changed, 245 insertions, 12 deletions
diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile index 231b4759c714..844bc9da08da 100644 --- a/scripts/kconfig/Makefile +++ b/scripts/kconfig/Makefile | |||
@@ -219,7 +219,9 @@ HOSTCFLAGS_gconf.o = `pkg-config --cflags gtk+-2.0 gmodule-2.0 libglade-2.0` \ | |||
219 | 219 | ||
220 | HOSTLOADLIBES_mconf = $(shell $(CONFIG_SHELL) $(check-lxdialog) -ldflags $(HOSTCC)) | 220 | HOSTLOADLIBES_mconf = $(shell $(CONFIG_SHELL) $(check-lxdialog) -ldflags $(HOSTCC)) |
221 | 221 | ||
222 | HOSTLOADLIBES_nconf = -lmenu -lpanel -lncurses | 222 | HOSTLOADLIBES_nconf = $(shell \ |
223 | pkg-config --libs menu panel ncurses 2>/dev/null \ | ||
224 | || echo "-lmenu -lpanel -lncurses" ) | ||
223 | $(obj)/qconf.o: $(obj)/.tmp_qtcheck | 225 | $(obj)/qconf.o: $(obj)/.tmp_qtcheck |
224 | 226 | ||
225 | ifeq ($(qconf-target),1) | 227 | ifeq ($(qconf-target),1) |
diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c index e39fcd8143ea..bde5b95c8c19 100644 --- a/scripts/kconfig/conf.c +++ b/scripts/kconfig/conf.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <getopt.h> | 13 | #include <getopt.h> |
14 | #include <sys/stat.h> | 14 | #include <sys/stat.h> |
15 | #include <sys/time.h> | 15 | #include <sys/time.h> |
16 | #include <errno.h> | ||
16 | 17 | ||
17 | #include "lkc.h" | 18 | #include "lkc.h" |
18 | 19 | ||
@@ -514,14 +515,23 @@ int main(int ac, char **av) | |||
514 | { | 515 | { |
515 | struct timeval now; | 516 | struct timeval now; |
516 | unsigned int seed; | 517 | unsigned int seed; |
518 | char *seed_env; | ||
517 | 519 | ||
518 | /* | 520 | /* |
519 | * Use microseconds derived seed, | 521 | * Use microseconds derived seed, |
520 | * compensate for systems where it may be zero | 522 | * compensate for systems where it may be zero |
521 | */ | 523 | */ |
522 | gettimeofday(&now, NULL); | 524 | gettimeofday(&now, NULL); |
523 | |||
524 | seed = (unsigned int)((now.tv_sec + 1) * (now.tv_usec + 1)); | 525 | seed = (unsigned int)((now.tv_sec + 1) * (now.tv_usec + 1)); |
526 | |||
527 | seed_env = getenv("KCONFIG_SEED"); | ||
528 | if( seed_env && *seed_env ) { | ||
529 | char *endp; | ||
530 | int tmp = (int)strtol(seed_env, &endp, 10); | ||
531 | if (*endp == '\0') { | ||
532 | seed = tmp; | ||
533 | } | ||
534 | } | ||
525 | srand(seed); | 535 | srand(seed); |
526 | break; | 536 | break; |
527 | } | 537 | } |
diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c index 13ddf1126c2a..43eda40c3838 100644 --- a/scripts/kconfig/confdata.c +++ b/scripts/kconfig/confdata.c | |||
@@ -1106,10 +1106,54 @@ static void set_all_choice_values(struct symbol *csym) | |||
1106 | void conf_set_all_new_symbols(enum conf_def_mode mode) | 1106 | void conf_set_all_new_symbols(enum conf_def_mode mode) |
1107 | { | 1107 | { |
1108 | struct symbol *sym, *csym; | 1108 | struct symbol *sym, *csym; |
1109 | int i, cnt; | 1109 | int i, cnt, pby, pty, ptm; /* pby: probability of boolean = y |
1110 | * pty: probability of tristate = y | ||
1111 | * ptm: probability of tristate = m | ||
1112 | */ | ||
1113 | |||
1114 | pby = 50; pty = ptm = 33; /* can't go as the default in switch-case | ||
1115 | * below, otherwise gcc whines about | ||
1116 | * -Wmaybe-uninitialized */ | ||
1117 | if (mode == def_random) { | ||
1118 | int n, p[3]; | ||
1119 | char *env = getenv("KCONFIG_PROBABILITY"); | ||
1120 | n = 0; | ||
1121 | while( env && *env ) { | ||
1122 | char *endp; | ||
1123 | int tmp = strtol( env, &endp, 10 ); | ||
1124 | if( tmp >= 0 && tmp <= 100 ) { | ||
1125 | p[n++] = tmp; | ||
1126 | } else { | ||
1127 | errno = ERANGE; | ||
1128 | perror( "KCONFIG_PROBABILITY" ); | ||
1129 | exit( 1 ); | ||
1130 | } | ||
1131 | env = (*endp == ':') ? endp+1 : endp; | ||
1132 | if( n >=3 ) { | ||
1133 | break; | ||
1134 | } | ||
1135 | } | ||
1136 | switch( n ) { | ||
1137 | case 1: | ||
1138 | pby = p[0]; ptm = pby/2; pty = pby-ptm; | ||
1139 | break; | ||
1140 | case 2: | ||
1141 | pty = p[0]; ptm = p[1]; pby = pty + ptm; | ||
1142 | break; | ||
1143 | case 3: | ||
1144 | pby = p[0]; pty = p[1]; ptm = p[2]; | ||
1145 | break; | ||
1146 | } | ||
1147 | |||
1148 | if( pty+ptm > 100 ) { | ||
1149 | errno = ERANGE; | ||
1150 | perror( "KCONFIG_PROBABILITY" ); | ||
1151 | exit( 1 ); | ||
1152 | } | ||
1153 | } | ||
1110 | 1154 | ||
1111 | for_all_symbols(i, sym) { | 1155 | for_all_symbols(i, sym) { |
1112 | if (sym_has_value(sym)) | 1156 | if (sym_has_value(sym) || (sym->flags & SYMBOL_VALID)) |
1113 | continue; | 1157 | continue; |
1114 | switch (sym_get_type(sym)) { | 1158 | switch (sym_get_type(sym)) { |
1115 | case S_BOOLEAN: | 1159 | case S_BOOLEAN: |
@@ -1125,8 +1169,15 @@ void conf_set_all_new_symbols(enum conf_def_mode mode) | |||
1125 | sym->def[S_DEF_USER].tri = no; | 1169 | sym->def[S_DEF_USER].tri = no; |
1126 | break; | 1170 | break; |
1127 | case def_random: | 1171 | case def_random: |
1128 | cnt = sym_get_type(sym) == S_TRISTATE ? 3 : 2; | 1172 | sym->def[S_DEF_USER].tri = no; |
1129 | sym->def[S_DEF_USER].tri = (tristate)(rand() % cnt); | 1173 | cnt = rand() % 100; |
1174 | if (sym->type == S_TRISTATE) { | ||
1175 | if (cnt < pty) | ||
1176 | sym->def[S_DEF_USER].tri = yes; | ||
1177 | else if (cnt < (pty+ptm)) | ||
1178 | sym->def[S_DEF_USER].tri = mod; | ||
1179 | } else if (cnt < pby) | ||
1180 | sym->def[S_DEF_USER].tri = yes; | ||
1130 | break; | 1181 | break; |
1131 | default: | 1182 | default: |
1132 | continue; | 1183 | continue; |
diff --git a/scripts/kconfig/list.h b/scripts/kconfig/list.h index 0ae730be5f49..685d80e1bb0e 100644 --- a/scripts/kconfig/list.h +++ b/scripts/kconfig/list.h | |||
@@ -51,6 +51,19 @@ struct list_head { | |||
51 | pos = list_entry(pos->member.next, typeof(*pos), member)) | 51 | pos = list_entry(pos->member.next, typeof(*pos), member)) |
52 | 52 | ||
53 | /** | 53 | /** |
54 | * list_for_each_entry_safe - iterate over list of given type safe against removal of list entry | ||
55 | * @pos: the type * to use as a loop cursor. | ||
56 | * @n: another type * to use as temporary storage | ||
57 | * @head: the head for your list. | ||
58 | * @member: the name of the list_struct within the struct. | ||
59 | */ | ||
60 | #define list_for_each_entry_safe(pos, n, head, member) \ | ||
61 | for (pos = list_entry((head)->next, typeof(*pos), member), \ | ||
62 | n = list_entry(pos->member.next, typeof(*pos), member); \ | ||
63 | &pos->member != (head); \ | ||
64 | pos = n, n = list_entry(n->member.next, typeof(*n), member)) | ||
65 | |||
66 | /** | ||
54 | * list_empty - tests whether a list is empty | 67 | * list_empty - tests whether a list is empty |
55 | * @head: the list to test. | 68 | * @head: the list to test. |
56 | */ | 69 | */ |
@@ -88,4 +101,31 @@ static inline void list_add_tail(struct list_head *_new, struct list_head *head) | |||
88 | __list_add(_new, head->prev, head); | 101 | __list_add(_new, head->prev, head); |
89 | } | 102 | } |
90 | 103 | ||
104 | /* | ||
105 | * Delete a list entry by making the prev/next entries | ||
106 | * point to each other. | ||
107 | * | ||
108 | * This is only for internal list manipulation where we know | ||
109 | * the prev/next entries already! | ||
110 | */ | ||
111 | static inline void __list_del(struct list_head *prev, struct list_head *next) | ||
112 | { | ||
113 | next->prev = prev; | ||
114 | prev->next = next; | ||
115 | } | ||
116 | |||
117 | #define LIST_POISON1 ((void *) 0x00100100) | ||
118 | #define LIST_POISON2 ((void *) 0x00200200) | ||
119 | /** | ||
120 | * list_del - deletes entry from list. | ||
121 | * @entry: the element to delete from the list. | ||
122 | * Note: list_empty() on entry does not return true after this, the entry is | ||
123 | * in an undefined state. | ||
124 | */ | ||
125 | static inline void list_del(struct list_head *entry) | ||
126 | { | ||
127 | __list_del(entry->prev, entry->next); | ||
128 | entry->next = (struct list_head*)LIST_POISON1; | ||
129 | entry->prev = (struct list_head*)LIST_POISON2; | ||
130 | } | ||
91 | #endif | 131 | #endif |
diff --git a/scripts/kconfig/lxdialog/check-lxdialog.sh b/scripts/kconfig/lxdialog/check-lxdialog.sh index 80788137c670..9d2a4c585ee1 100644 --- a/scripts/kconfig/lxdialog/check-lxdialog.sh +++ b/scripts/kconfig/lxdialog/check-lxdialog.sh | |||
@@ -4,6 +4,8 @@ | |||
4 | # What library to link | 4 | # What library to link |
5 | ldflags() | 5 | ldflags() |
6 | { | 6 | { |
7 | pkg-config --libs ncursesw 2>/dev/null && exit | ||
8 | pkg-config --libs ncurses 2>/dev/null && exit | ||
7 | for ext in so a dll.a dylib ; do | 9 | for ext in so a dll.a dylib ; do |
8 | for lib in ncursesw ncurses curses ; do | 10 | for lib in ncursesw ncurses curses ; do |
9 | $cc -print-file-name=lib${lib}.${ext} | grep -q / | 11 | $cc -print-file-name=lib${lib}.${ext} | grep -q / |
@@ -20,12 +22,12 @@ ldflags() | |||
20 | ccflags() | 22 | ccflags() |
21 | { | 23 | { |
22 | if [ -f /usr/include/ncursesw/curses.h ]; then | 24 | if [ -f /usr/include/ncursesw/curses.h ]; then |
23 | echo '-I/usr/include/ncursesw -DCURSES_LOC="<ncursesw/curses.h>"' | 25 | echo '-I/usr/include/ncursesw -DCURSES_LOC="<curses.h>"' |
24 | echo ' -DNCURSES_WIDECHAR=1' | 26 | echo ' -DNCURSES_WIDECHAR=1' |
25 | elif [ -f /usr/include/ncurses/ncurses.h ]; then | 27 | elif [ -f /usr/include/ncurses/ncurses.h ]; then |
26 | echo '-I/usr/include/ncurses -DCURSES_LOC="<ncurses.h>"' | 28 | echo '-I/usr/include/ncurses -DCURSES_LOC="<ncurses.h>"' |
27 | elif [ -f /usr/include/ncurses/curses.h ]; then | 29 | elif [ -f /usr/include/ncurses/curses.h ]; then |
28 | echo '-I/usr/include/ncurses -DCURSES_LOC="<ncurses/curses.h>"' | 30 | echo '-I/usr/include/ncurses -DCURSES_LOC="<curses.h>"' |
29 | elif [ -f /usr/include/ncurses.h ]; then | 31 | elif [ -f /usr/include/ncurses.h ]; then |
30 | echo '-DCURSES_LOC="<ncurses.h>"' | 32 | echo '-DCURSES_LOC="<ncurses.h>"' |
31 | else | 33 | else |
diff --git a/scripts/kconfig/lxdialog/dialog.h b/scripts/kconfig/lxdialog/dialog.h index 307022a8beef..1099337079b6 100644 --- a/scripts/kconfig/lxdialog/dialog.h +++ b/scripts/kconfig/lxdialog/dialog.h | |||
@@ -106,8 +106,14 @@ struct dialog_color { | |||
106 | int hl; /* highlight this item */ | 106 | int hl; /* highlight this item */ |
107 | }; | 107 | }; |
108 | 108 | ||
109 | struct subtitle_list { | ||
110 | struct subtitle_list *next; | ||
111 | const char *text; | ||
112 | }; | ||
113 | |||
109 | struct dialog_info { | 114 | struct dialog_info { |
110 | const char *backtitle; | 115 | const char *backtitle; |
116 | struct subtitle_list *subtitles; | ||
111 | struct dialog_color screen; | 117 | struct dialog_color screen; |
112 | struct dialog_color shadow; | 118 | struct dialog_color shadow; |
113 | struct dialog_color dialog; | 119 | struct dialog_color dialog; |
@@ -196,6 +202,7 @@ int on_key_resize(void); | |||
196 | 202 | ||
197 | int init_dialog(const char *backtitle); | 203 | int init_dialog(const char *backtitle); |
198 | void set_dialog_backtitle(const char *backtitle); | 204 | void set_dialog_backtitle(const char *backtitle); |
205 | void set_dialog_subtitles(struct subtitle_list *subtitles); | ||
199 | void end_dialog(int x, int y); | 206 | void end_dialog(int x, int y); |
200 | void attr_clear(WINDOW * win, int height, int width, chtype attr); | 207 | void attr_clear(WINDOW * win, int height, int width, chtype attr); |
201 | void dialog_clear(void); | 208 | void dialog_clear(void); |
diff --git a/scripts/kconfig/lxdialog/util.c b/scripts/kconfig/lxdialog/util.c index 109d53117d22..a0e97c299410 100644 --- a/scripts/kconfig/lxdialog/util.c +++ b/scripts/kconfig/lxdialog/util.c | |||
@@ -257,12 +257,48 @@ void dialog_clear(void) | |||
257 | attr_clear(stdscr, LINES, COLS, dlg.screen.atr); | 257 | attr_clear(stdscr, LINES, COLS, dlg.screen.atr); |
258 | /* Display background title if it exists ... - SLH */ | 258 | /* Display background title if it exists ... - SLH */ |
259 | if (dlg.backtitle != NULL) { | 259 | if (dlg.backtitle != NULL) { |
260 | int i; | 260 | int i, len = 0, skip = 0; |
261 | struct subtitle_list *pos; | ||
261 | 262 | ||
262 | wattrset(stdscr, dlg.screen.atr); | 263 | wattrset(stdscr, dlg.screen.atr); |
263 | mvwaddstr(stdscr, 0, 1, (char *)dlg.backtitle); | 264 | mvwaddstr(stdscr, 0, 1, (char *)dlg.backtitle); |
265 | |||
266 | for (pos = dlg.subtitles; pos != NULL; pos = pos->next) { | ||
267 | /* 3 is for the arrow and spaces */ | ||
268 | len += strlen(pos->text) + 3; | ||
269 | } | ||
270 | |||
264 | wmove(stdscr, 1, 1); | 271 | wmove(stdscr, 1, 1); |
265 | for (i = 1; i < COLS - 1; i++) | 272 | if (len > COLS - 2) { |
273 | const char *ellipsis = "[...] "; | ||
274 | waddstr(stdscr, ellipsis); | ||
275 | skip = len - (COLS - 2 - strlen(ellipsis)); | ||
276 | } | ||
277 | |||
278 | for (pos = dlg.subtitles; pos != NULL; pos = pos->next) { | ||
279 | if (skip == 0) | ||
280 | waddch(stdscr, ACS_RARROW); | ||
281 | else | ||
282 | skip--; | ||
283 | |||
284 | if (skip == 0) | ||
285 | waddch(stdscr, ' '); | ||
286 | else | ||
287 | skip--; | ||
288 | |||
289 | if (skip < strlen(pos->text)) { | ||
290 | waddstr(stdscr, pos->text + skip); | ||
291 | skip = 0; | ||
292 | } else | ||
293 | skip -= strlen(pos->text); | ||
294 | |||
295 | if (skip == 0) | ||
296 | waddch(stdscr, ' '); | ||
297 | else | ||
298 | skip--; | ||
299 | } | ||
300 | |||
301 | for (i = len + 1; i < COLS - 1; i++) | ||
266 | waddch(stdscr, ACS_HLINE); | 302 | waddch(stdscr, ACS_HLINE); |
267 | } | 303 | } |
268 | wnoutrefresh(stdscr); | 304 | wnoutrefresh(stdscr); |
@@ -302,6 +338,11 @@ void set_dialog_backtitle(const char *backtitle) | |||
302 | dlg.backtitle = backtitle; | 338 | dlg.backtitle = backtitle; |
303 | } | 339 | } |
304 | 340 | ||
341 | void set_dialog_subtitles(struct subtitle_list *subtitles) | ||
342 | { | ||
343 | dlg.subtitles = subtitles; | ||
344 | } | ||
345 | |||
305 | /* | 346 | /* |
306 | * End using dialog functions. | 347 | * End using dialog functions. |
307 | */ | 348 | */ |
diff --git a/scripts/kconfig/mconf.c b/scripts/kconfig/mconf.c index 566288a76370..387dc8daf7b2 100644 --- a/scripts/kconfig/mconf.c +++ b/scripts/kconfig/mconf.c | |||
@@ -311,6 +311,50 @@ static void set_config_filename(const char *config_filename) | |||
311 | filename[sizeof(filename)-1] = '\0'; | 311 | filename[sizeof(filename)-1] = '\0'; |
312 | } | 312 | } |
313 | 313 | ||
314 | struct subtitle_part { | ||
315 | struct list_head entries; | ||
316 | const char *text; | ||
317 | }; | ||
318 | static LIST_HEAD(trail); | ||
319 | |||
320 | static struct subtitle_list *subtitles; | ||
321 | static void set_subtitle(void) | ||
322 | { | ||
323 | struct subtitle_part *sp; | ||
324 | struct subtitle_list *pos, *tmp; | ||
325 | |||
326 | for (pos = subtitles; pos != NULL; pos = tmp) { | ||
327 | tmp = pos->next; | ||
328 | free(pos); | ||
329 | } | ||
330 | |||
331 | subtitles = NULL; | ||
332 | list_for_each_entry(sp, &trail, entries) { | ||
333 | if (sp->text) { | ||
334 | if (pos) { | ||
335 | pos->next = xcalloc(sizeof(*pos), 1); | ||
336 | pos = pos->next; | ||
337 | } else { | ||
338 | subtitles = pos = xcalloc(sizeof(*pos), 1); | ||
339 | } | ||
340 | pos->text = sp->text; | ||
341 | } | ||
342 | } | ||
343 | |||
344 | set_dialog_subtitles(subtitles); | ||
345 | } | ||
346 | |||
347 | static void reset_subtitle(void) | ||
348 | { | ||
349 | struct subtitle_list *pos, *tmp; | ||
350 | |||
351 | for (pos = subtitles; pos != NULL; pos = tmp) { | ||
352 | tmp = pos->next; | ||
353 | free(pos); | ||
354 | } | ||
355 | subtitles = NULL; | ||
356 | set_dialog_subtitles(subtitles); | ||
357 | } | ||
314 | 358 | ||
315 | struct search_data { | 359 | struct search_data { |
316 | struct list_head *head; | 360 | struct list_head *head; |
@@ -353,6 +397,8 @@ static void search_conf(void) | |||
353 | char *dialog_input; | 397 | char *dialog_input; |
354 | int dres, vscroll = 0, hscroll = 0; | 398 | int dres, vscroll = 0, hscroll = 0; |
355 | bool again; | 399 | bool again; |
400 | struct gstr sttext; | ||
401 | struct subtitle_part stpart; | ||
356 | 402 | ||
357 | title = str_new(); | 403 | title = str_new(); |
358 | str_printf( &title, _("Enter %s (sub)string to search for " | 404 | str_printf( &title, _("Enter %s (sub)string to search for " |
@@ -379,6 +425,11 @@ again: | |||
379 | if (strncasecmp(dialog_input_result, CONFIG_, strlen(CONFIG_)) == 0) | 425 | if (strncasecmp(dialog_input_result, CONFIG_, strlen(CONFIG_)) == 0) |
380 | dialog_input += strlen(CONFIG_); | 426 | dialog_input += strlen(CONFIG_); |
381 | 427 | ||
428 | sttext = str_new(); | ||
429 | str_printf(&sttext, "Search (%s)", dialog_input_result); | ||
430 | stpart.text = str_get(&sttext); | ||
431 | list_add_tail(&stpart.entries, &trail); | ||
432 | |||
382 | sym_arr = sym_re_search(dialog_input); | 433 | sym_arr = sym_re_search(dialog_input); |
383 | do { | 434 | do { |
384 | LIST_HEAD(head); | 435 | LIST_HEAD(head); |
@@ -389,8 +440,10 @@ again: | |||
389 | .targets = targets, | 440 | .targets = targets, |
390 | .keys = keys, | 441 | .keys = keys, |
391 | }; | 442 | }; |
443 | struct jump_key *pos, *tmp; | ||
392 | 444 | ||
393 | res = get_relations_str(sym_arr, &head); | 445 | res = get_relations_str(sym_arr, &head); |
446 | set_subtitle(); | ||
394 | dres = show_textbox_ext(_("Search Results"), (char *) | 447 | dres = show_textbox_ext(_("Search Results"), (char *) |
395 | str_get(&res), 0, 0, keys, &vscroll, | 448 | str_get(&res), 0, 0, keys, &vscroll, |
396 | &hscroll, &update_text, (void *) | 449 | &hscroll, &update_text, (void *) |
@@ -402,9 +455,13 @@ again: | |||
402 | again = true; | 455 | again = true; |
403 | } | 456 | } |
404 | str_free(&res); | 457 | str_free(&res); |
458 | list_for_each_entry_safe(pos, tmp, &head, entries) | ||
459 | free(pos); | ||
405 | } while (again); | 460 | } while (again); |
406 | free(sym_arr); | 461 | free(sym_arr); |
407 | str_free(&title); | 462 | str_free(&title); |
463 | list_del(trail.prev); | ||
464 | str_free(&sttext); | ||
408 | } | 465 | } |
409 | 466 | ||
410 | static void build_conf(struct menu *menu) | 467 | static void build_conf(struct menu *menu) |
@@ -589,16 +646,24 @@ static void conf(struct menu *menu, struct menu *active_menu) | |||
589 | { | 646 | { |
590 | struct menu *submenu; | 647 | struct menu *submenu; |
591 | const char *prompt = menu_get_prompt(menu); | 648 | const char *prompt = menu_get_prompt(menu); |
649 | struct subtitle_part stpart; | ||
592 | struct symbol *sym; | 650 | struct symbol *sym; |
593 | int res; | 651 | int res; |
594 | int s_scroll = 0; | 652 | int s_scroll = 0; |
595 | 653 | ||
654 | if (menu != &rootmenu) | ||
655 | stpart.text = menu_get_prompt(menu); | ||
656 | else | ||
657 | stpart.text = NULL; | ||
658 | list_add_tail(&stpart.entries, &trail); | ||
659 | |||
596 | while (1) { | 660 | while (1) { |
597 | item_reset(); | 661 | item_reset(); |
598 | current_menu = menu; | 662 | current_menu = menu; |
599 | build_conf(menu); | 663 | build_conf(menu); |
600 | if (!child_count) | 664 | if (!child_count) |
601 | break; | 665 | break; |
666 | set_subtitle(); | ||
602 | dialog_clear(); | 667 | dialog_clear(); |
603 | res = dialog_menu(prompt ? _(prompt) : _("Main Menu"), | 668 | res = dialog_menu(prompt ? _(prompt) : _("Main Menu"), |
604 | _(menu_instructions), | 669 | _(menu_instructions), |
@@ -640,13 +705,17 @@ static void conf(struct menu *menu, struct menu *active_menu) | |||
640 | case 2: | 705 | case 2: |
641 | if (sym) | 706 | if (sym) |
642 | show_help(submenu); | 707 | show_help(submenu); |
643 | else | 708 | else { |
709 | reset_subtitle(); | ||
644 | show_helptext(_("README"), _(mconf_readme)); | 710 | show_helptext(_("README"), _(mconf_readme)); |
711 | } | ||
645 | break; | 712 | break; |
646 | case 3: | 713 | case 3: |
714 | reset_subtitle(); | ||
647 | conf_save(); | 715 | conf_save(); |
648 | break; | 716 | break; |
649 | case 4: | 717 | case 4: |
718 | reset_subtitle(); | ||
650 | conf_load(); | 719 | conf_load(); |
651 | break; | 720 | break; |
652 | case 5: | 721 | case 5: |
@@ -679,6 +748,8 @@ static void conf(struct menu *menu, struct menu *active_menu) | |||
679 | break; | 748 | break; |
680 | } | 749 | } |
681 | } | 750 | } |
751 | |||
752 | list_del(trail.prev); | ||
682 | } | 753 | } |
683 | 754 | ||
684 | static int show_textbox_ext(const char *title, char *text, int r, int c, int | 755 | static int show_textbox_ext(const char *title, char *text, int r, int c, int |
@@ -881,6 +952,7 @@ static int handle_exit(void) | |||
881 | int res; | 952 | int res; |
882 | 953 | ||
883 | save_and_exit = 1; | 954 | save_and_exit = 1; |
955 | reset_subtitle(); | ||
884 | dialog_clear(); | 956 | dialog_clear(); |
885 | if (conf_get_changed()) | 957 | if (conf_get_changed()) |
886 | res = dialog_yesno(NULL, | 958 | res = dialog_yesno(NULL, |
diff --git a/scripts/kconfig/merge_config.sh b/scripts/kconfig/merge_config.sh index 05274fccb88e..81b0c61bb9e2 100755 --- a/scripts/kconfig/merge_config.sh +++ b/scripts/kconfig/merge_config.sh | |||
@@ -120,10 +120,18 @@ if [ "$MAKE" = "false" ]; then | |||
120 | exit | 120 | exit |
121 | fi | 121 | fi |
122 | 122 | ||
123 | # If we have an output dir, setup the O= argument, otherwise leave | ||
124 | # it blank, since O=. will create an unnecessary ./source softlink | ||
125 | OUTPUT_ARG="" | ||
126 | if [ "$OUTPUT" != "." ] ; then | ||
127 | OUTPUT_ARG="O=$OUTPUT" | ||
128 | fi | ||
129 | |||
130 | |||
123 | # Use the merged file as the starting point for: | 131 | # Use the merged file as the starting point for: |
124 | # alldefconfig: Fills in any missing symbols with Kconfig default | 132 | # alldefconfig: Fills in any missing symbols with Kconfig default |
125 | # allnoconfig: Fills in any missing symbols with # CONFIG_* is not set | 133 | # allnoconfig: Fills in any missing symbols with # CONFIG_* is not set |
126 | make KCONFIG_ALLCONFIG=$TMP_FILE O=$OUTPUT $ALLTARGET | 134 | make KCONFIG_ALLCONFIG=$TMP_FILE $OUTPUT_ARG $ALLTARGET |
127 | 135 | ||
128 | 136 | ||
129 | # Check all specified config values took (might have missed-dependency issues) | 137 | # Check all specified config values took (might have missed-dependency issues) |