#include <unistd.h>
#include <locale.h>
+#define BUFSIZE 524288
#define LKC_DIRECT_LINK
#include "lkc.h"
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 [*], <M> 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 <Y> to build it in, <M> to make it a module or\n"
-"<N> to removed it. You may also press the <Space Bar> to cycle\n"
+"keys and press <Y> to include it, <M> to make it a package or\n"
+"<N> to remove it. You may also press the <Space Bar> to cycle\n"
"through the available options (ie. Y->N->M->Y).\n"
"\n"
"Some additional keyboard hints:\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"
"\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"
"Arrow keys navigate the menu. "
"<Enter> selects submenus --->. "
"Highlighted letters are hotkeys. "
- "Pressing <Y> includes, <N> excludes, <M> modularizes features. "
+ "Pressing <Y> includes, <N> excludes, <M> builds as package. "
"Press <Esc><Esc> to exit, <?> for Help, </> for Search. "
- "Legend: [*] built-in [ ] excluded <M> module < > module capable"),
+ "Legend: [*] built-in [ ] excluded <M> 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 "
"Please enter a string value. "
"Use the <TAB> 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"
"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"
" 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;
sym_get_string_value(sym));
for_all_prompts(sym, prop)
get_prompt_str(r, prop);
+
hit = false;
for_all_properties(sym, prop, P_SELECT) {
if (!hit) {
}
if (hit)
str_append(r, "\n");
+
+ hit = false;
+ for_all_properties(sym, prop, P_DESELECT) {
+ if (!hit) {
+ str_append(r, " Deselects: ");
+ hit = true;
+ } else
+ str_printf(r, " && ");
+ expr_gstr_print(prop->expr, r);
+ }
+ if (hit)
+ str_append(r, "\n");
+
if (sym->rev_dep.expr) {
str_append(r, " Selected by: ");
expr_gstr_print(sym->rev_dep.expr, r);
str_append(r, "\n");
}
+ if (sym->rev_dep_inv.expr) {
+ str_append(r, " Deselected by: ");
+ expr_gstr_print(sym->rev_dep_inv.expr, r);
+ str_append(r, "\n");
+ }
str_append(r, "\n\n");
}
if (menu == &rootmenu) {
cprint(":");
cprint("--- ");
+ cprint("D");
+ cprint(_(" Reset to defaults"));
cprint("L");
cprint(_(" Load an Alternate Configuration File"));
cprint("S");
case 's':
conf_string(submenu);
break;
+ case 'D':
+ conf_reset();
+ break;
case 'L':
conf_load();
break;
struct gstr help = str_new();
struct symbol *sym = menu->sym;
+ help.max_width = cols - 10;
+
if (sym->help)
{
if (sym->name) {
const char *prompt = menu_get_prompt(menu);
struct menu *child;
struct symbol *active;
+ struct property *prop;
int stat;
active = sym_get_choice_value(menu->sym);
case 0:
if (sscanf(input_buf, "%p", &child) != 1)
break;
+
+ if (sym_get_tristate_value(child->sym) != yes) {
+ for_all_properties(menu->sym, prop, P_RESET) {
+ if (expr_calc_value(prop->visible.expr) != no)
+ conf_reset();
+ }
+ }
sym_set_tristate_value(child->sym, yes);
return;
case 1:
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");
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();
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"));
}