25
25
static const char mconf_readme[] = N_(
28
"Some kernel features may be built directly into the kernel.\n"
29
"Some may be made into loadable runtime modules. Some features\n"
30
"may be completely removed altogether. There are also certain\n"
31
"kernel parameters which are not really features, but must be\n"
32
"entered in as decimal or hexadecimal numbers or possibly text.\n"
28
"This interface let you select features and parameters for the build.\n"
29
"Features can either be built-in, modularized, or ignored. Parameters\n"
30
"must be entered in as decimal or hexadecimal numbers or text.\n"
34
32
"Menu items beginning with following braces represent features that\n"
35
33
" [ ] can be built in or removed\n"
67
65
" there is a delayed response which you may find annoying.\n"
69
67
" Also, the <TAB> and cursor keys will cycle between <Select>,\n"
70
" <Exit> and <Help>\n"
68
" <Exit> and <Help>.\n"
72
70
"o To get help with an item, use the cursor keys to highlight <Help>\n"
73
" and Press <ENTER>.\n"
71
" and press <ENTER>.\n"
75
73
" Shortcut: Press <H> or <?>.\n"
75
"o To toggle the display of hidden options, press <Z>.\n"
78
78
"Radiolists (Choice lists)\n"
115
115
"-----------------------------\n"
116
116
"Menuconfig supports the use of alternate configuration files for\n"
117
117
"those who, for various reasons, find it necessary to switch\n"
118
"between different kernel configurations.\n"
118
"between different configurations.\n"
120
120
"At the end of the main menu you will find two options. One is\n"
121
121
"for saving the current configuration to a file of your choosing.\n"
149
149
"Optional personality available\n"
150
150
"------------------------------\n"
151
"If you prefer to have all of the kernel options listed in a single\n"
152
"menu, rather than the default multimenu hierarchy, run the menuconfig\n"
153
"with MENUCONFIG_MODE environment variable set to single_menu. Example:\n"
151
"If you prefer to have all of the options listed in a single menu, rather\n"
152
"than the default multimenu hierarchy, run the menuconfig with\n"
153
"MENUCONFIG_MODE environment variable set to single_menu. Example:\n"
155
155
"make MENUCONFIG_MODE=single_menu menuconfig\n"
205
205
"last retrieved. Leave blank to abort."),
206
206
load_config_help[] = N_(
208
"For various reasons, one may wish to keep several different kernel\n"
208
"For various reasons, one may wish to keep several different\n"
209
209
"configurations available on a single machine.\n"
211
211
"If you have saved a previous configuration in a file other than the\n"
212
"kernel's default, entering the name of the file here will allow you\n"
213
"to modify that configuration.\n"
212
"default one, entering its name here will allow you to modify that\n"
215
215
"If you are uncertain, then you have probably never used alternate\n"
216
"configuration files. You should therefor leave this blank to abort.\n"),
216
"configuration files. You should therefore leave this blank to abort.\n"),
217
217
save_config_text[] = N_(
218
218
"Enter a filename to which this configuration should be saved "
219
219
"as an alternate. Leave blank to abort."),
220
220
save_config_help[] = N_(
222
"For various reasons, one may wish to keep different kernel\n"
223
"configurations available on a single machine.\n"
222
"For various reasons, one may wish to keep different configurations\n"
223
"available on a single machine.\n"
225
225
"Entering a file name here will allow you to later retrieve, modify\n"
226
226
"and use the current configuration as an alternate to whatever\n"
247
247
"Selected by: BAR\n"
248
248
"-----------------------------------------------------------------\n"
249
249
"o The line 'Prompt:' shows the text used in the menu structure for\n"
250
" this CONFIG_ symbol\n"
251
251
"o The 'Defined at' line tell at what file / line number the symbol\n"
253
253
"o The 'Depends on:' line tell what symbols needs to be defined for\n"
263
263
"Only relevant lines are shown.\n"
265
265
"Search examples:\n"
266
"Examples: USB => find all CONFIG_ symbols containing USB\n"
267
" ^USB => find all CONFIG_ symbols starting with USB\n"
268
" USB$ => find all CONFIG_ symbols ending with USB\n"
266
"Examples: USB => find all symbols containing USB\n"
267
" ^USB => find all symbols starting with USB\n"
268
" USB$ => find all symbols ending with USB\n"
271
271
static int indent;
272
272
static struct menu *current_menu;
273
273
static int child_count;
274
274
static int single_menu_mode;
275
static int show_all_options;
276
277
static void conf(struct menu *menu);
277
278
static void conf_choice(struct menu *menu);
282
283
static void show_helptext(const char *title, const char *text);
283
284
static void show_help(struct menu *menu);
285
static struct gstr get_relations_str(struct symbol **sym_arr)
288
struct gstr res = str_new();
291
for (i = 0; sym_arr && (sym = sym_arr[i]); i++)
292
get_symbol_str(&res, sym);
294
str_append(&res, _("No matches found.\n"));
298
286
static char filename[PATH_MAX+1];
299
287
static void set_config_filename(const char *config_filename)
301
289
static char menu_backtitle[PATH_MAX+128];
305
sym = sym_lookup("KERNELVERSION", 0);
307
292
size = snprintf(menu_backtitle, sizeof(menu_backtitle),
308
_("%s - Linux Kernel v%s Configuration"),
309
config_filename, sym_get_string_value(sym));
293
"%s - %s", config_filename, rootmenu.prompt->text);
310
294
if (size >= sizeof(menu_backtitle))
311
295
menu_backtitle[sizeof(menu_backtitle)-1] = '\0';
312
296
set_dialog_backtitle(menu_backtitle);
328
312
dres = dialog_inputbox(_("Search Configuration Parameter"),
329
_("Enter CONFIG_ (sub)string to search for "
330
"(with or without \"CONFIG\")"),
313
_("Enter " CONFIG_ " (sub)string to search for "
314
"(with or without \"" CONFIG_ "\")"),
342
/* strip CONFIG_ if necessary */
326
/* strip the prefix if necessary */
343
327
dialog_input = dialog_input_result;
344
if (strncasecmp(dialog_input_result, "CONFIG_", 7) == 0)
328
if (strncasecmp(dialog_input_result, CONFIG_, strlen(CONFIG_)) == 0)
329
dialog_input += strlen(CONFIG_);
347
331
sym_arr = sym_re_search(dialog_input);
348
332
res = get_relations_str(sym_arr);
359
343
int type, tmp, doint = 2;
363
if (!menu_is_visible(menu))
349
* note: menu_is_visible() has side effect that it will
350
* recalc the value of the symbol.
352
visible = menu_is_visible(menu);
353
if (show_all_options && !menu_has_prompt(menu))
355
else if (!show_all_options && !visible)
639
634
struct gstr help = str_new();
636
help.max_width = getmaxx(stdscr) - 10;
641
637
menu_get_ext_help(menu, &help);
643
639
show_helptext(_(menu_get_prompt(menu)), str_get(&help));
845
841
if (conf_write(filename)) {
846
842
fprintf(stderr, _("\n\n"
847
"Error during writing of the kernel configuration.\n"
848
"Your kernel configuration changes were NOT saved."
843
"Error while writing of the configuration.\n"
844
"Your configuration changes were NOT saved."
854
"*** End of Linux kernel configuration.\n"
855
"*** Execute 'make' to build the kernel or try 'make help'."
850
"*** End of the configuration.\n"
851
"*** Execute 'make' to start the build or try 'make help'."
859
855
fprintf(stderr, _("\n\n"
860
"Your kernel configuration changes were NOT saved."
856
"Your configuration changes were NOT saved."