diff options
-rw-r--r-- | Config.in | 4 | ||||
-rw-r--r-- | Makefile | 4 | ||||
-rw-r--r-- | kconfig/Makefile | 6 | ||||
-rw-r--r-- | lib/args.c | 3 | ||||
-rw-r--r-- | toys/catv.c | 2 | ||||
-rw-r--r-- | toys/df.c | 2 | ||||
-rw-r--r-- | toys/pwd.c | 2 | ||||
-rw-r--r-- | toys/toysh.c | 2 | ||||
-rw-r--r-- | toys/which.c | 2 |
9 files changed, 16 insertions, 11 deletions
@@ -2,7 +2,7 @@ mainmenu "ToyBox Configuration" menu "Global settings" -config TOYS_FREE +config TOYBOX_FREE bool "Free memory unnecessarily" default n help @@ -12,7 +12,7 @@ config TOYS_FREE without a real OS (ala newlib+libgloss), enable this to make toybox clean up after itself. -config DEBUG +config TOYBOX_DEBUG bool "Debugging tests" default n help @@ -12,6 +12,10 @@ all: toybox include kconfig/Makefile +# defconfig is the "maximum sane config"; allyesconfig minus debugging and such. +defconfig: allyesconfig + @sed -i -r -e "s/^(CONFIG_(TOYBOX_DEBUG|TOYBOX_FREE))=.*/# \1 is not set/" .config + .config: Config.in toys/Config.in # The long and roundabout sed is to make old versions of sed happy. New ones diff --git a/kconfig/Makefile b/kconfig/Makefile index 46a8f6e4..f66432e5 100644 --- a/kconfig/Makefile +++ b/kconfig/Makefile @@ -5,7 +5,7 @@ KCONFIG_TOP = Config.in obj = ./kconfig PHONY += clean help oldconfig menuconfig config silentoldconfig \ - randconfig allyesconfig allnoconfig allmodconfig defconfig + randconfig allyesconfig allnoconfig allmodconfig #defconfig menuconfig: $(obj)/mconf $< $(KCONFIG_TOP) @@ -28,8 +28,8 @@ allyesconfig: $(obj)/conf allnoconfig: $(obj)/conf $< -n $(KCONFIG_TOP) -defconfig: $(obj)/conf - $< -d $(KCONFIG_TOP) +#defconfig: $(obj)/conf +# $< -d $(KCONFIG_TOP) # Help text used by make help help:: @@ -169,7 +169,8 @@ void get_optflags(void) // Find the end of the longopt for (end = ++options; *end && *end != ')'; end++); - if (CFG_DEBUG && !*end) error_exit("Unterminated optstring"); + if (CFG_TOYBOX_DEBUG && !*end) + error_exit("Unterminated optstring"); // Allocate and init a new struct longopts lo = xmalloc(sizeof(struct longopts)); diff --git a/toys/catv.c b/toys/catv.c index 9097c065..ee23061d 100644 --- a/toys/catv.c +++ b/toys/catv.c @@ -53,7 +53,7 @@ int catv_main(void) putchar(c); } } - if (CFG_TOYS_FREE && fd) close(fd); + if (CFG_TOYBOX_FREE && fd) close(fd); } while (*++argv); return retval; @@ -113,7 +113,7 @@ int df_main(void) } } - if (CFG_TOYS_FREE) llist_free(mtlist, NULL); + if (CFG_TOYBOX_FREE) llist_free(mtlist, NULL); return 0; } @@ -10,7 +10,7 @@ int pwd_main(void) char *pwd = xgetcwd(); xprintf("%s\n", pwd); - if (CFG_TOYS_FREE) free(pwd); + if (CFG_TOYBOX_FREE) free(pwd); return 0; } diff --git a/toys/toysh.c b/toys/toysh.c index 074907ef..c383b89a 100644 --- a/toys/toysh.c +++ b/toys/toysh.c @@ -212,7 +212,7 @@ int toysh_main(void) if (1 > getline(&command, &cmdlen, f ? : stdin)) break; handle(command); } - if (CFG_TOYS_FREE) free(command); + if (CFG_TOYBOX_FREE) free(command); } return 1; diff --git a/toys/which.c b/toys/which.c index 16e19d00..df7566c0 100644 --- a/toys/which.c +++ b/toys/which.c @@ -61,7 +61,7 @@ int which_main(void) int i; for (i=0; toys.optargs[i]; i++) rc |= which_in_path(toys.optargs[i]); } - // if (CFG_TOYS_FREE) free(argv); + // if (CFG_TOYBOX_FREE) free(argv); return rc; } |