X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/5c472fc895c32a189d574b338057164e95430825..8cca288aa5c21e2595c0508c76680e44faa22722:/scripts/config/mconf.c diff --git a/scripts/config/mconf.c b/scripts/config/mconf.c index bb82bbe49..b3709fe80 100644 --- a/scripts/config/mconf.c +++ b/scripts/config/mconf.c @@ -22,6 +22,7 @@ #include #include +#define BUFSIZE 32768 #define LKC_DIRECT_LINK #include "lkc.h" @@ -29,19 +30,17 @@ static char menu_backtitle[128]; static const char mconf_readme[] = N_( "Overview\n" "--------\n" -"Some kernel features may be built directly into the kernel.\n" -"Some may be made into loadable runtime modules. Some features\n" -"may be completely removed altogether. There are also certain\n" -"kernel parameters which are not really features, but must be\n" -"entered in as decimal or hexadecimal numbers or possibly text.\n" +"Some OpenWrt features may be built directly into the image.\n" +"Some may be made into installable ipkg packages. Some features\n" +"may be completely removed altogether.\n" "\n" "Menu items beginning with [*], or [ ] represent features\n" -"configured to be built in, modularized or removed respectively.\n" -"Pointed brackets <> represent module capable features.\n" +"configured to be included, built as package or removed respectively.\n" +"Pointed brackets <> represent packaging capable features.\n" "\n" "To change any of these features, highlight it with the cursor\n" -"keys and press to build it in, to make it a module or\n" -" to removed it. You may also press the to cycle\n" +"keys and press to include it, to make it a package or\n" +" to remove it. You may also press the to cycle\n" "through the available options (ie. Y->N->M->Y).\n" "\n" "Some additional keyboard hints:\n" @@ -115,7 +114,7 @@ static const char mconf_readme[] = N_( "-----------------------------\n" "Menuconfig supports the use of alternate configuration files for\n" "those who, for various reasons, find it necessary to switch\n" -"between different kernel configurations.\n" +"between different OpenWrt configurations.\n" "\n" "At the end of the main menu you will find two options. One is\n" "for saving the current configuration to a file of your choosing.\n" @@ -148,7 +147,7 @@ static const char mconf_readme[] = N_( "\n" "Optional personality available\n" "------------------------------\n" -"If you prefer to have all of the kernel options listed in a single\n" +"If you prefer to have all of the build options listed in a single\n" "menu, rather than the default multimenu hierarchy, run the menuconfig\n" "with MENUCONFIG_MODE environment variable set to single_menu. Example:\n" "\n" @@ -164,9 +163,9 @@ menu_instructions[] = N_( "Arrow keys navigate the menu. " " selects submenus --->. " "Highlighted letters are hotkeys. " - "Pressing includes, excludes, modularizes features. " + "Pressing includes, excludes, builds as package. " "Press to exit, for Help, for Search. " - "Legend: [*] built-in [ ] excluded module < > module capable"), + "Legend: [*] built-in [ ] excluded package < > package capable"), radiolist_instructions[] = N_( "Use the arrow keys to navigate this window or " "press the hotkey of the item you wish to select " @@ -183,21 +182,21 @@ inputbox_instructions_string[] = N_( "Please enter a string value. " "Use the key to move from the input field to the buttons below it."), setmod_text[] = N_( - "This feature depends on another which has been configured as a module.\n" - "As a result, this feature will be built as a module."), + "This feature depends on another which has been configured as a package.\n" + "As a result, this feature will be built as a package."), nohelp_text[] = N_( - "There is no help available for this kernel option.\n"), + "There is no help available for this config option.\n"), load_config_text[] = N_( "Enter the name of the configuration file you wish to load. " "Accept the name shown to restore the configuration you " "last retrieved. Leave blank to abort."), load_config_help[] = N_( "\n" - "For various reasons, one may wish to keep several different kernel\n" + "For various reasons, one may wish to keep several different OpenWrt\n" "configurations available on a single machine.\n" "\n" - "If you have saved a previous configuration in a file other than the\n" - "kernel's default, entering the name of the file here will allow you\n" + "If you have saved a previous configuration in a file other than\n" + "OpenWrt's default, entering the name of the file here will allow you\n" "to modify that configuration.\n" "\n" "If you are uncertain, then you have probably never used alternate\n" @@ -207,7 +206,7 @@ save_config_text[] = N_( "as an alternate. Leave blank to abort."), save_config_help[] = N_( "\n" - "For various reasons, one may wish to keep different kernel\n" + "For various reasons, one may wish to keep different OpenWrt\n" "configurations available on a single machine.\n" "\n" "Entering a file name here will allow you to later retrieve, modify\n" @@ -256,10 +255,10 @@ search_help[] = N_( " USB$ => find all CONFIG_ symbols ending with USB\n" "\n"); -static char buf[4096], *bufptr = buf; -static char input_buf[4096]; +static char buf[BUFSIZE], *bufptr = buf; +static char input_buf[BUFSIZE]; static char filename[PATH_MAX+1] = ".config"; -static char *args[1024], **argptr = args; +static char *args[BUFSIZE], **argptr = args; static int indent; static struct termios ios_org; static int rows = 0, cols = 0; @@ -739,6 +738,8 @@ static void conf(struct menu *menu) if (menu == &rootmenu) { cprint(":"); cprint("--- "); + cprint("D"); + cprint(_(" Reset to defaults")); cprint("L"); cprint(_(" Load an Alternate Configuration File")); cprint("S"); @@ -785,6 +786,9 @@ static void conf(struct menu *menu) case 's': conf_string(submenu); break; + case 'D': + conf_reset(); + break; case 'L': conf_load(); break; @@ -1051,9 +1055,9 @@ int main(int ac, char **av) conf_parse(av[1]); conf_read(NULL); - sym = sym_lookup("KERNELVERSION", 0); + sym = sym_lookup("OPENWRTVERSION", 0); sym_calc_value(sym); - sprintf(menu_backtitle, _("Linux Kernel v%s Configuration"), + sprintf(menu_backtitle, _("OpenWrt %s Configuration"), sym_get_string_value(sym)); mode = getenv("MENUCONFIG_MODE"); @@ -1070,7 +1074,7 @@ int main(int ac, char **av) do { cprint_init(); cprint("--yesno"); - cprint(_("Do you wish to save your new kernel configuration?")); + cprint(_("Do you wish to save your new OpenWrt configuration?")); cprint("5"); cprint("60"); stat = exec_conf(); @@ -1079,18 +1083,18 @@ int main(int ac, char **av) if (stat == 0) { if (conf_write(NULL)) { fprintf(stderr, _("\n\n" - "Error during writing of the kernel configuration.\n" - "Your kernel configuration changes were NOT saved." + "Error during writing of the OpenWrt configuration.\n" + "Your configuration changes were NOT saved." "\n\n")); return 1; } printf(_("\n\n" - "*** End of Linux kernel configuration.\n" - "*** Execute 'make' to build the kernel or try 'make help'." + "*** End of OpenWrt configuration.\n" + "*** Execute 'make' to build the OpenWrt or try 'make help'." "\n\n")); } else { fprintf(stderr, _("\n\n" - "Your kernel configuration changes were NOT saved." + "Your configuration changes were NOT saved." "\n\n")); }