MahiroOS-jhalfs/menu/BusyBox-1.1.3-menu.patch

508 lines
14 KiB
Diff

diff -Npr menu-bb/conf.c menu/conf.c
*** menu-bb/conf.c 2006-03-22 16:16:18.000000000 -0500
--- menu/conf.c 2006-07-26 17:26:45.000000000 -0400
*************** int main(int ac, char **av)
*** 535,554 ****
conf_parse(name);
//zconfdump(stdout);
switch (input_mode) {
- case set_default:
- if (!defconfig_file)
- defconfig_file = conf_get_default_confname();
- if (conf_read(defconfig_file)) {
- printf("***\n"
- "*** Can't find default configuration \"%s\"!\n"
- "***\n", defconfig_file);
- exit(1);
- }
- break;
case ask_silent:
if (stat(".config", &tmpstat)) {
printf("***\n"
! "*** You have not yet configured BusyBox!\n"
"***\n"
"*** Please run some configurator (e.g. \"make oldconfig\" or\n"
"*** \"make menuconfig\" or \"make config\").\n"
--- 535,544 ----
conf_parse(name);
//zconfdump(stdout);
switch (input_mode) {
case ask_silent:
if (stat(".config", &tmpstat)) {
printf("***\n"
! "*** You have not yet configured JHALFS!\n"
"***\n"
"*** Please run some configurator (e.g. \"make oldconfig\" or\n"
"*** \"make menuconfig\" or \"make config\").\n"
*************** int main(int ac, char **av)
*** 576,582 ****
check_conf(&rootmenu);
} while (conf_cnt);
if (conf_write(NULL)) {
! fprintf(stderr, "\n*** Error during writing of the BusyBox configuration.\n\n");
return 1;
}
return 0;
--- 566,572 ----
check_conf(&rootmenu);
} while (conf_cnt);
if (conf_write(NULL)) {
! fprintf(stderr, "\n*** Error during writing of the JHALFS configuration.\n\n");
return 1;
}
return 0;
diff -Npr menu-bb/confdata.c menu/confdata.c
*** menu-bb/confdata.c 2006-03-22 16:16:18.000000000 -0500
--- menu/confdata.c 2006-07-26 17:26:45.000000000 -0400
***************
*** 13,24 ****
#define LKC_DIRECT_LINK
#include "lkc.h"
! const char conf_def_filename[] = ".config";
const char conf_defname[] = "defconfig";
const char *conf_confnames[] = {
! ".config",
conf_defname,
NULL,
};
--- 13,24 ----
#define LKC_DIRECT_LINK
#include "lkc.h"
! const char conf_def_filename[] = "configuration";
const char conf_defname[] = "defconfig";
const char *conf_confnames[] = {
! "configuration",
conf_defname,
NULL,
};
*************** static char *conf_expand_value(const cha
*** 49,70 ****
return res_value;
}
- char *conf_get_default_confname(void)
- {
- struct stat buf;
- static char fullname[PATH_MAX+1];
- char *env, *name;
-
- name = conf_expand_value(conf_defname);
- env = getenv(SRCTREE);
- if (env) {
- sprintf(fullname, "%s/%s", env, name);
- if (!stat(fullname, &buf))
- return fullname;
- }
- return name;
- }
-
int conf_read(const char *name)
{
FILE *in = NULL;
--- 49,54 ----
*************** struct menu *next_menu(struct menu *menu
*** 271,277 ****
int conf_write(const char *name)
{
! FILE *out, *out_h;
struct symbol *sym;
struct menu *menu;
const char *basename;
--- 255,261 ----
int conf_write(const char *name)
{
! FILE *out;
struct symbol *sym;
struct menu *menu;
const char *basename;
*************** int conf_write(const char *name)
*** 279,288 ****
int type, l;
const char *str;
- /* busybox`s code */
- const char *opt_name;
- int use_flg;
-
dirname[0] = 0;
if (name && name[0]) {
struct stat st;
--- 263,268 ----
*************** int conf_write(const char *name)
*** 309,342 ****
out = fopen(newname, "w");
if (!out)
return 1;
- out_h = NULL;
- if (!name) {
- out_h = fopen(".tmpconfig.h", "w");
- if (!out_h)
- return 1;
- }
fprintf(out, "#\n"
! "# Automatically generated make config: don't edit\n"
"#\n");
- /* busybox`s code */
- if (out_h) {
- fprintf(out_h, "#ifndef BB_CONFIG_H\n#define BB_CONFIG_H\n");
- fprintf(out_h, "/*\n"
- " * Automatically generated header file: don't edit\n"
- " */\n\n"
- "/* Version Number */\n"
- "#define BB_VER \"%s\"\n"
- "#define BB_BT \"%s\"\n",
- getenv("VERSION"),
- getenv("BUILDTIME"));
- if (getenv("EXTRA_VERSION"))
- fprintf(out_h, "#define BB_EXTRA_VERSION \"%s\"\n",
- getenv("EXTRA_VERSION"));
- fprintf(out_h, "\n");
- }
- /* end busybox`s code */
-
if (!sym_change_count)
sym_clear_all_valid();
--- 289,299 ----
out = fopen(newname, "w");
if (!out)
return 1;
fprintf(out, "#\n"
! "# Automatically generated configuration: don't edit\n"
! "# use make menuconfig or make config to make changes\n"
"#\n");
if (!sym_change_count)
sym_clear_all_valid();
*************** int conf_write(const char *name)
*** 357,367 ****
"#\n"
"# %s\n"
"#\n", str);
- if (out_h)
- fprintf(out_h, "\n"
- "/*\n"
- " * %s\n"
- " */\n", str);
} else if (!(sym->flags & SYMBOL_CHOICE)) {
sym_calc_value(sym);
if (!(sym->flags & SYMBOL_FORCEWRITE))
--- 314,319 ----
*************** int conf_write(const char *name)
*** 375,388 ****
type = S_BOOLEAN;
}
- /* busybox`s code */
- opt_name = strchr(sym->name, '_');
- if(opt_name == NULL)
- opt_name = sym->name;
- else
- opt_name++;
- use_flg = 1;
- /* end busybox`s code */
switch (type) {
case S_BOOLEAN:
--- 327,332 ----
*************** int conf_write(const char *name)
*** 390,410 ****
switch (sym_get_tristate_value(sym)) {
case no:
fprintf(out, "# %s is not set\n", sym->name);
- if (out_h)
- fprintf(out_h, "#undef %s\n", sym->name);
- use_flg = 0; /* busybox`s code */
break;
case mod:
- #if 0 /* busybox`s code */
fprintf(out, "%s=m\n", sym->name);
- if (out_h)
- fprintf(out_h, "#define %s_MODULE 1\n", sym->name);
- #endif /* busybox`s code */
break;
case yes:
fprintf(out, "%s=y\n", sym->name);
- if (out_h)
- fprintf(out_h, "#define %s 1\n", sym->name);
break;
}
break;
--- 334,345 ----
*************** int conf_write(const char *name)
*** 412,473 ****
// fix me
str = sym_get_string_value(sym);
fprintf(out, "%s=\"", sym->name);
- if (out_h)
- fprintf(out_h, "#define %s \"", sym->name);
do {
l = strcspn(str, "\"\\");
if (l) {
fwrite(str, l, 1, out);
- if (out_h)
- fwrite(str, l, 1, out_h);
}
str += l;
while (*str == '\\' || *str == '"') {
fprintf(out, "\\%c", *str);
- if (out_h)
- fprintf(out_h, "\\%c", *str);
str++;
}
} while (*str);
fputs("\"\n", out);
- if (out_h)
- fputs("\"\n", out_h);
break;
case S_HEX:
str = sym_get_string_value(sym);
if (str[0] != '0' || (str[1] != 'x' && str[1] != 'X')) {
fprintf(out, "%s=%s\n", sym->name, *str ? str : "0");
- if (out_h)
- fprintf(out_h, "#define %s 0x%s\n", sym->name, str);
break;
}
case S_INT:
str = sym_get_string_value(sym);
fprintf(out, "%s=%s\n", sym->name, *str ? str : "0");
- if (out_h)
- fprintf(out_h, "#define %s %s\n", sym->name, str);
break;
}
- /* busybox`s code */
- if (out_h) {
- fprintf(out_h, "#define ENABLE_%s %d\n", opt_name, use_flg);
- fprintf(out_h, "#define USE_%s(...)%s\n", opt_name,
- (use_flg ? " __VA_ARGS__" : ""));
- fprintf(out_h, "#define SKIP_%s(...)%s\n\n", opt_name,
- (use_flg ? "" : " __VA_ARGS__"));
- }
- /* end busybox`s code */
}
next:
menu = next_menu(menu);
}
fclose(out);
- if (out_h) {
- fprintf(out_h, "#endif /* BB_CONFIG_H */\n"); /* busybox`s code */
- fclose(out_h);
- rename(".tmpconfig.h", "include/bb_config.h"); /* busybox`s config name */
- file_write_dep(NULL);
- }
if (!name || basename != conf_def_filename) {
if (!name)
name = conf_def_filename;
--- 347,381 ----
diff -Npr menu-bb/Makefile menu/Makefile
*** menu-bb/Makefile 2006-03-22 16:16:18.000000000 -0500
--- menu/Makefile 2006-07-26 18:06:25.000000000 -0400
***************
*** 1,11 ****
# Makefile for BusyBox
#
# Copyright (C) 2002 Erik Andersen <andersen@codepoet.org>
- top_srcdir=../..
- top_builddir=../..
- srcdir=$(top_srcdir)/scripts/config
- include $(top_srcdir)/Rules.mak
all: ncurses conf mconf
--- 1,30 ----
# Makefile for BusyBox
#
# Copyright (C) 2002 Erik Andersen <andersen@codepoet.org>
+ # Modified by George Boudreau georgeb@LinuxFromScratch.org
+
+ top_srcdir=.
+ top_builddir=.
+ srcdir=$(top_srcdir)
+
+ # Select the compiler needed to build binaries for your development system
+ HOSTCC = gcc
+ HOSTCFLAGS= -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer
+
+ # Ensure consistent sort order, 'gcc -print-search-dirs' behavior, etc.
+ LC_ALL:= C
+
+ SED ?= sed
+ SECHO := @-false
+ DISP := pur
+ Q := @
+
+ show_objs = $(subst $(top_builddir)/,,$(subst ../,,$@))
+ pur_disp_compile.h = echo " "HOSTCC $(show_objs)
+ disp_compile.h = $($(DISP)_disp_compile.h)
+ cmd_compile.h = $(HOSTCC) $(HOSTCFLAGS) -c -o $@ $<
+ compile.h = @$(disp_compile.h) ; $(cmd_compile.h)
all: ncurses conf mconf
diff -Npr menu-bb/mconf.c menu/mconf.c
*** menu-bb/mconf.c 2006-03-22 16:16:18.000000000 -0500
--- menu/mconf.c 2006-07-26 17:26:45.000000000 -0400
*************** static char menu_backtitle[128];
*** 32,38 ****
static const char mconf_readme[] =
"Overview\n"
"--------\n"
! "Some features may be built directly into BusyBox. Some features\n"
"may be completely removed altogether. There are also certain\n"
"parameters which are not really features, but must be\n"
"entered in as decimal or hexadecimal numbers or possibly text.\n"
--- 32,38 ----
static const char mconf_readme[] =
"Overview\n"
"--------\n"
! "Some features may be built directly into JHALFS. Some features\n"
"may be completely removed altogether. There are also certain\n"
"parameters which are not really features, but must be\n"
"entered in as decimal or hexadecimal numbers or possibly text.\n"
*************** load_config_text[] =
*** 194,204 ****
"last retrieved. Leave blank to abort.",
load_config_help[] =
"\n"
! "For various reasons, one may wish to keep several different BusyBox\n"
"configurations available on a single machine.\n"
"\n"
"If you have saved a previous configuration in a file other than the\n"
! "BusyBox'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"
--- 194,204 ----
"last retrieved. Leave blank to abort.",
load_config_help[] =
"\n"
! "For various reasons, one may wish to keep several different JHALFS\n"
"configurations available on a single machine.\n"
"\n"
"If you have saved a previous configuration in a file other than the\n"
! "JHALFS'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"
*************** save_config_text[] =
*** 208,214 ****
"as an alternate. Leave blank to abort.",
save_config_help[] =
"\n"
! "For various reasons, one may wish to keep different BusyBox\n"
"configurations available on a single machine.\n"
"\n"
"Entering a file name here will allow you to later retrieve, modify\n"
--- 208,214 ----
"as an alternate. Leave blank to abort.",
save_config_help[] =
"\n"
! "For various reasons, one may wish to keep different JHALFS\n"
"configurations available on a single machine.\n"
"\n"
"Entering a file name here will allow you to later retrieve, modify\n"
*************** int main(int ac, char **av)
*** 940,946 ****
sym = sym_lookup("VERSION", 0);
sym_calc_value(sym);
! snprintf(menu_backtitle, 128, "BusyBox v%s Configuration",
sym_get_string_value(sym));
mode = getenv("MENUCONFIG_MODE");
--- 940,946 ----
sym = sym_lookup("VERSION", 0);
sym_calc_value(sym);
! snprintf(menu_backtitle, 128, "JHALFS v%s Configuration",
sym_get_string_value(sym));
mode = getenv("MENUCONFIG_MODE");
*************** int main(int ac, char **av)
*** 961,976 ****
init_dialog();
do {
stat = dialog_yesno(NULL,
! "Do you wish to save your new BusyBox configuration?", 5, 60);
} while (stat < 0);
end_dialog();
if (stat == 0) {
conf_write(NULL);
printf("\n"
! "*** End of BusyBox configuration.\n");
} else
! printf("\n\nYour BusyBox configuration changes were NOT saved.\n\n");
return 0;
}
--- 961,976 ----
init_dialog();
do {
stat = dialog_yesno(NULL,
! "Do you wish to save your new JHALFS configuration?", 5, 60);
} while (stat < 0);
end_dialog();
if (stat == 0) {
conf_write(NULL);
printf("\n"
! "*** End of JHALFS configuration.\n");
} else
! printf("\n\nYour JHALFS configuration changes were NOT saved.\n\n");
return 0;
}
diff -Npr menu-bb/zconf.tab.c_shipped menu/zconf.tab.c_shipped
*** menu-bb/zconf.tab.c_shipped 2006-03-22 16:16:18.000000000 -0500
--- menu/zconf.tab.c_shipped 2006-07-26 17:26:45.000000000 -0400
*************** void conf_parse(const char *name)
*** 1925,1931 ****
sym_init();
menu_init();
modules_sym = sym_lookup("MODULES", 0);
! rootmenu.prompt = menu_add_prop(P_MENU, "BusyBox Configuration", NULL, NULL);
//zconfdebug = 1;
zconfparse();
--- 1925,1931 ----
sym_init();
menu_init();
modules_sym = sym_lookup("MODULES", 0);
! rootmenu.prompt = menu_add_prop(P_MENU, "JHALFS Configuration", NULL, NULL);
//zconfdebug = 1;
zconfparse();
diff -Npr menu-bb/zconf.y menu/zconf.y
*** menu-bb/zconf.y 2006-03-22 16:16:18.000000000 -0500
--- menu/zconf.y 2006-07-26 17:26:45.000000000 -0400
*************** void conf_parse(const char *name)
*** 487,493 ****
sym_init();
menu_init();
modules_sym = sym_lookup("MODULES", 0);
! rootmenu.prompt = menu_add_prop(P_MENU, "BusyBox Configuration", NULL, NULL);
//zconfdebug = 1;
zconfparse();
--- 487,493 ----
sym_init();
menu_init();
modules_sym = sym_lookup("MODULES", 0);
! rootmenu.prompt = menu_add_prop(P_MENU, "JHALFS Configuration", NULL, NULL);
//zconfdebug = 1;
zconfparse();