diff options
Diffstat (limited to 'scripts/kconfig/mconf.c')
-rw-r--r-- | scripts/kconfig/mconf.c | 64 |
1 files changed, 29 insertions, 35 deletions
diff --git a/scripts/kconfig/mconf.c b/scripts/kconfig/mconf.c index d2f6e056c058..d433c7a24745 100644 --- a/scripts/kconfig/mconf.c +++ b/scripts/kconfig/mconf.c | |||
@@ -25,11 +25,9 @@ | |||
25 | static const char mconf_readme[] = N_( | 25 | static const char mconf_readme[] = N_( |
26 | "Overview\n" | 26 | "Overview\n" |
27 | "--------\n" | 27 | "--------\n" |
28 | "Some kernel features may be built directly into the kernel.\n" | 28 | "This interface let you select features and parameters for the build.\n" |
29 | "Some may be made into loadable runtime modules. Some features\n" | 29 | "Features can either be built-in, modularized, or ignored. Parameters\n" |
30 | "may be completely removed altogether. There are also certain\n" | 30 | "must be entered in as decimal or hexadecimal numbers or text.\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" | ||
33 | "\n" | 31 | "\n" |
34 | "Menu items beginning with following braces represent features that\n" | 32 | "Menu items beginning with following braces represent features that\n" |
35 | " [ ] can be built in or removed\n" | 33 | " [ ] can be built in or removed\n" |
@@ -117,7 +115,7 @@ static const char mconf_readme[] = N_( | |||
117 | "-----------------------------\n" | 115 | "-----------------------------\n" |
118 | "Menuconfig supports the use of alternate configuration files for\n" | 116 | "Menuconfig supports the use of alternate configuration files for\n" |
119 | "those who, for various reasons, find it necessary to switch\n" | 117 | "those who, for various reasons, find it necessary to switch\n" |
120 | "between different kernel configurations.\n" | 118 | "between different configurations.\n" |
121 | "\n" | 119 | "\n" |
122 | "At the end of the main menu you will find two options. One is\n" | 120 | "At the end of the main menu you will find two options. One is\n" |
123 | "for saving the current configuration to a file of your choosing.\n" | 121 | "for saving the current configuration to a file of your choosing.\n" |
@@ -150,9 +148,9 @@ static const char mconf_readme[] = N_( | |||
150 | "\n" | 148 | "\n" |
151 | "Optional personality available\n" | 149 | "Optional personality available\n" |
152 | "------------------------------\n" | 150 | "------------------------------\n" |
153 | "If you prefer to have all of the kernel options listed in a single\n" | 151 | "If you prefer to have all of the options listed in a single menu, rather\n" |
154 | "menu, rather than the default multimenu hierarchy, run the menuconfig\n" | 152 | "than the default multimenu hierarchy, run the menuconfig with\n" |
155 | "with MENUCONFIG_MODE environment variable set to single_menu. Example:\n" | 153 | "MENUCONFIG_MODE environment variable set to single_menu. Example:\n" |
156 | "\n" | 154 | "\n" |
157 | "make MENUCONFIG_MODE=single_menu menuconfig\n" | 155 | "make MENUCONFIG_MODE=single_menu menuconfig\n" |
158 | "\n" | 156 | "\n" |
@@ -207,12 +205,12 @@ load_config_text[] = N_( | |||
207 | "last retrieved. Leave blank to abort."), | 205 | "last retrieved. Leave blank to abort."), |
208 | load_config_help[] = N_( | 206 | load_config_help[] = N_( |
209 | "\n" | 207 | "\n" |
210 | "For various reasons, one may wish to keep several different kernel\n" | 208 | "For various reasons, one may wish to keep several different\n" |
211 | "configurations available on a single machine.\n" | 209 | "configurations available on a single machine.\n" |
212 | "\n" | 210 | "\n" |
213 | "If you have saved a previous configuration in a file other than the\n" | 211 | "If you have saved a previous configuration in a file other than the\n" |
214 | "kernel's default, entering the name of the file here will allow you\n" | 212 | "default one, entering its name here will allow you to modify that\n" |
215 | "to modify that configuration.\n" | 213 | "configuration.\n" |
216 | "\n" | 214 | "\n" |
217 | "If you are uncertain, then you have probably never used alternate\n" | 215 | "If you are uncertain, then you have probably never used alternate\n" |
218 | "configuration files. You should therefore leave this blank to abort.\n"), | 216 | "configuration files. You should therefore leave this blank to abort.\n"), |
@@ -221,8 +219,8 @@ save_config_text[] = N_( | |||
221 | "as an alternate. Leave blank to abort."), | 219 | "as an alternate. Leave blank to abort."), |
222 | save_config_help[] = N_( | 220 | save_config_help[] = N_( |
223 | "\n" | 221 | "\n" |
224 | "For various reasons, one may wish to keep different kernel\n" | 222 | "For various reasons, one may wish to keep different configurations\n" |
225 | "configurations available on a single machine.\n" | 223 | "available on a single machine.\n" |
226 | "\n" | 224 | "\n" |
227 | "Entering a file name here will allow you to later retrieve, modify\n" | 225 | "Entering a file name here will allow you to later retrieve, modify\n" |
228 | "and use the current configuration as an alternate to whatever\n" | 226 | "and use the current configuration as an alternate to whatever\n" |
@@ -232,7 +230,7 @@ save_config_help[] = N_( | |||
232 | "leave this blank.\n"), | 230 | "leave this blank.\n"), |
233 | search_help[] = N_( | 231 | search_help[] = N_( |
234 | "\n" | 232 | "\n" |
235 | "Search for CONFIG_ symbols and display their relations.\n" | 233 | "Search for symbols and display their relations.\n" |
236 | "Regular expressions are allowed.\n" | 234 | "Regular expressions are allowed.\n" |
237 | "Example: search for \"^FOO\"\n" | 235 | "Example: search for \"^FOO\"\n" |
238 | "Result:\n" | 236 | "Result:\n" |
@@ -249,7 +247,7 @@ search_help[] = N_( | |||
249 | "Selected by: BAR\n" | 247 | "Selected by: BAR\n" |
250 | "-----------------------------------------------------------------\n" | 248 | "-----------------------------------------------------------------\n" |
251 | "o The line 'Prompt:' shows the text used in the menu structure for\n" | 249 | "o The line 'Prompt:' shows the text used in the menu structure for\n" |
252 | " this CONFIG_ symbol\n" | 250 | " this symbol\n" |
253 | "o The 'Defined at' line tell at what file / line number the symbol\n" | 251 | "o The 'Defined at' line tell at what file / line number the symbol\n" |
254 | " is defined\n" | 252 | " is defined\n" |
255 | "o The 'Depends on:' line tell what symbols needs to be defined for\n" | 253 | "o The 'Depends on:' line tell what symbols needs to be defined for\n" |
@@ -265,9 +263,9 @@ search_help[] = N_( | |||
265 | "Only relevant lines are shown.\n" | 263 | "Only relevant lines are shown.\n" |
266 | "\n\n" | 264 | "\n\n" |
267 | "Search examples:\n" | 265 | "Search examples:\n" |
268 | "Examples: USB => find all CONFIG_ symbols containing USB\n" | 266 | "Examples: USB => find all symbols containing USB\n" |
269 | " ^USB => find all CONFIG_ symbols starting with USB\n" | 267 | " ^USB => find all symbols starting with USB\n" |
270 | " USB$ => find all CONFIG_ symbols ending with USB\n" | 268 | " USB$ => find all symbols ending with USB\n" |
271 | "\n"); | 269 | "\n"); |
272 | 270 | ||
273 | static int indent; | 271 | static int indent; |
@@ -290,13 +288,9 @@ static void set_config_filename(const char *config_filename) | |||
290 | { | 288 | { |
291 | static char menu_backtitle[PATH_MAX+128]; | 289 | static char menu_backtitle[PATH_MAX+128]; |
292 | int size; | 290 | int size; |
293 | struct symbol *sym; | ||
294 | 291 | ||
295 | sym = sym_lookup("KERNELVERSION", 0); | ||
296 | sym_calc_value(sym); | ||
297 | size = snprintf(menu_backtitle, sizeof(menu_backtitle), | 292 | size = snprintf(menu_backtitle, sizeof(menu_backtitle), |
298 | _("%s - Linux Kernel v%s Configuration"), | 293 | "%s - %s", config_filename, rootmenu.prompt->text); |
299 | config_filename, sym_get_string_value(sym)); | ||
300 | if (size >= sizeof(menu_backtitle)) | 294 | if (size >= sizeof(menu_backtitle)) |
301 | menu_backtitle[sizeof(menu_backtitle)-1] = '\0'; | 295 | menu_backtitle[sizeof(menu_backtitle)-1] = '\0'; |
302 | set_dialog_backtitle(menu_backtitle); | 296 | set_dialog_backtitle(menu_backtitle); |
@@ -316,8 +310,8 @@ static void search_conf(void) | |||
316 | again: | 310 | again: |
317 | dialog_clear(); | 311 | dialog_clear(); |
318 | dres = dialog_inputbox(_("Search Configuration Parameter"), | 312 | dres = dialog_inputbox(_("Search Configuration Parameter"), |
319 | _("Enter CONFIG_ (sub)string to search for " | 313 | _("Enter " CONFIG_ " (sub)string to search for " |
320 | "(with or without \"CONFIG\")"), | 314 | "(with or without \"" CONFIG_ "\")"), |
321 | 10, 75, ""); | 315 | 10, 75, ""); |
322 | switch (dres) { | 316 | switch (dres) { |
323 | case 0: | 317 | case 0: |
@@ -329,10 +323,10 @@ again: | |||
329 | return; | 323 | return; |
330 | } | 324 | } |
331 | 325 | ||
332 | /* strip CONFIG_ if necessary */ | 326 | /* strip the prefix if necessary */ |
333 | dialog_input = dialog_input_result; | 327 | dialog_input = dialog_input_result; |
334 | if (strncasecmp(dialog_input_result, "CONFIG_", 7) == 0) | 328 | if (strncasecmp(dialog_input_result, CONFIG_, strlen(CONFIG_)) == 0) |
335 | dialog_input += 7; | 329 | dialog_input += strlen(CONFIG_); |
336 | 330 | ||
337 | sym_arr = sym_re_search(dialog_input); | 331 | sym_arr = sym_re_search(dialog_input); |
338 | res = get_relations_str(sym_arr); | 332 | res = get_relations_str(sym_arr); |
@@ -834,7 +828,7 @@ int main(int ac, char **av) | |||
834 | if (conf_get_changed()) | 828 | if (conf_get_changed()) |
835 | res = dialog_yesno(NULL, | 829 | res = dialog_yesno(NULL, |
836 | _("Do you wish to save your " | 830 | _("Do you wish to save your " |
837 | "new kernel configuration?\n" | 831 | "new configuration?\n" |
838 | "<ESC><ESC> to continue."), | 832 | "<ESC><ESC> to continue."), |
839 | 6, 60); | 833 | 6, 60); |
840 | else | 834 | else |
@@ -846,20 +840,20 @@ int main(int ac, char **av) | |||
846 | case 0: | 840 | case 0: |
847 | if (conf_write(filename)) { | 841 | if (conf_write(filename)) { |
848 | fprintf(stderr, _("\n\n" | 842 | fprintf(stderr, _("\n\n" |
849 | "Error during writing of the kernel configuration.\n" | 843 | "Error while writing of the configuration.\n" |
850 | "Your kernel configuration changes were NOT saved." | 844 | "Your configuration changes were NOT saved." |
851 | "\n\n")); | 845 | "\n\n")); |
852 | return 1; | 846 | return 1; |
853 | } | 847 | } |
854 | case -1: | 848 | case -1: |
855 | printf(_("\n\n" | 849 | printf(_("\n\n" |
856 | "*** End of Linux kernel configuration.\n" | 850 | "*** End of the configuration.\n" |
857 | "*** Execute 'make' to build the kernel or try 'make help'." | 851 | "*** Execute 'make' to start the build or try 'make help'." |
858 | "\n\n")); | 852 | "\n\n")); |
859 | break; | 853 | break; |
860 | default: | 854 | default: |
861 | fprintf(stderr, _("\n\n" | 855 | fprintf(stderr, _("\n\n" |
862 | "Your kernel configuration changes were NOT saved." | 856 | "Your configuration changes were NOT saved." |
863 | "\n\n")); | 857 | "\n\n")); |
864 | } | 858 | } |
865 | 859 | ||