diff options
author | Denis Vlasenko | 2009-04-13 14:23:12 +0000 |
---|---|---|
committer | Denis Vlasenko | 2009-04-13 14:23:12 +0000 |
commit | 2b2183a77d7e8a01723fb96e7a39f109b15475f4 (patch) | |
tree | 3f7c27589c441fd1b82c8487b2c8eea70ee3d356 | |
parent | 323cbbfaa25f6bdc1ef343db01e58da3fea7fe6d (diff) | |
download | busybox-2b2183a77d7e8a01723fb96e7a39f109b15475f4.zip busybox-2b2183a77d7e8a01723fb96e7a39f109b15475f4.tar.gz |
hush: make function support configurable
-rw-r--r-- | scripts/defconfig | 45 | ||||
-rw-r--r-- | shell/Config.in | 35 | ||||
-rw-r--r-- | shell/hush.c | 2 |
3 files changed, 50 insertions, 32 deletions
diff --git a/scripts/defconfig b/scripts/defconfig index 166989b..50a6a33 100644 --- a/scripts/defconfig +++ b/scripts/defconfig @@ -1,10 +1,8 @@ -# defconfig is allyesconfig minus any features that are -# specialized (debugging etc) or make applet behavior change -# significantly from "standard" version of utilities. -# Applets which are severely incompatible with "standard" utilities -# or are not maintained /tested for some time, appear to be buggy -# and carry serious potential of breakage if used, may also be excluded - +# +# Automatically generated make config: don't edit +# Busybox version: 1.14.0.svn +# Mon Apr 13 16:22:36 2009 +# CONFIG_HAVE_DOT_CONFIG=y # @@ -49,6 +47,7 @@ CONFIG_FEATURE_HAVE_RPC=y # CONFIG_FEATURE_SHARED_BUSYBOX is not set CONFIG_LFS=y CONFIG_CROSS_COMPILER_PREFIX="" +CONFIG_EXTRA_CFLAGS="" # # Debugging Options @@ -210,6 +209,8 @@ CONFIG_RMDIR=y CONFIG_FEATURE_RMDIR_LONG_OPTIONS=y CONFIG_SEQ=y CONFIG_SHA1SUM=y +CONFIG_SHA256SUM=y +CONFIG_SHA512SUM=y CONFIG_SLEEP=y CONFIG_FEATURE_FANCY_SLEEP=y CONFIG_FEATURE_FLOAT_SLEEP=y @@ -389,6 +390,7 @@ CONFIG_FEATURE_SHADOWPASSWDS=y CONFIG_USE_BB_PWD_GRP=y CONFIG_USE_BB_SHADOW=y CONFIG_USE_BB_CRYPT=y +CONFIG_USE_BB_CRYPT_SHA=y CONFIG_ADDGROUP=y CONFIG_FEATURE_ADDUSER_TO_GROUP=y CONFIG_DELGROUP=y @@ -425,8 +427,6 @@ CONFIG_LSATTR=y # # Linux Module Utilities # -CONFIG_DEFAULT_MODULES_DIR="/lib/modules" -CONFIG_DEFAULT_DEPMOD_FILE="modules.dep" CONFIG_MODPROBE_SMALL=y CONFIG_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE=y CONFIG_FEATURE_MODPROBE_SMALL_CHECK_ALREADY_LOADED=y @@ -450,10 +450,14 @@ CONFIG_FEATURE_MODPROBE_SMALL_CHECK_ALREADY_LOADED=y # CONFIG_FEATURE_CHECK_TAINTED_MODULE is not set # CONFIG_FEATURE_MODUTILS_ALIAS is not set # CONFIG_FEATURE_MODUTILS_SYMBOLS is not set +CONFIG_DEFAULT_MODULES_DIR="/lib/modules" +CONFIG_DEFAULT_DEPMOD_FILE="modules.dep" # # Linux System Utilities # +CONFIG_ACPID=y +CONFIG_FEATURE_ACPID_COMPAT=y CONFIG_BLKID=y CONFIG_DMESG=y CONFIG_FEATURE_DMESG_PRETTY=y @@ -479,6 +483,7 @@ CONFIG_MKFS_MINIX=y # Minix filesystem support # CONFIG_FEATURE_MINIX2=y +CONFIG_MKFS_VFAT=y CONFIG_GETOPT=y CONFIG_HEXDUMP=y CONFIG_FEATURE_HEXDUMP_REVERSE=y @@ -561,6 +566,7 @@ CONFIG_CHRT=y CONFIG_CROND=y CONFIG_FEATURE_CROND_D=y CONFIG_FEATURE_CROND_CALL_SENDMAIL=y +CONFIG_FEATURE_CROND_DIR="/var/spool/cron" CONFIG_CRONTAB=y CONFIG_DC=y CONFIG_FEATURE_DC_LIBM=y @@ -573,6 +579,8 @@ CONFIG_DEVMEM=y CONFIG_EJECT=y CONFIG_FEATURE_EJECT_SCSI=y CONFIG_FBSPLASH=y +CONFIG_FLASH_ERASEALL=y +CONFIG_IONICE=y # CONFIG_INOTIFYD is not set CONFIG_LAST=y # CONFIG_FEATURE_LAST_SMALL is not set @@ -581,11 +589,11 @@ CONFIG_LESS=y CONFIG_FEATURE_LESS_MAXLINES=9999999 CONFIG_FEATURE_LESS_BRACKETS=y CONFIG_FEATURE_LESS_FLAGS=y -CONFIG_FEATURE_LESS_DASHCMD=y CONFIG_FEATURE_LESS_MARKS=y CONFIG_FEATURE_LESS_REGEXP=y -CONFIG_FEATURE_LESS_LINENUMS=y CONFIG_FEATURE_LESS_WINCH=y +CONFIG_FEATURE_LESS_DASHCMD=y +CONFIG_FEATURE_LESS_LINENUMS=y CONFIG_HDPARM=y CONFIG_FEATURE_HDPARM_GET_IDENTITY=y CONFIG_FEATURE_HDPARM_HDIO_SCAN_HWIF=y @@ -609,6 +617,7 @@ CONFIG_STRINGS=y # CONFIG_TASKSET is not set # CONFIG_FEATURE_TASKSET_FANCY is not set CONFIG_TIME=y +CONFIG_TIMEOUT=y CONFIG_TTYSIZE=y CONFIG_WATCHDOG=y @@ -626,6 +635,8 @@ CONFIG_FEATURE_BRCTL_SHOW=y CONFIG_DNSD=y CONFIG_ETHER_WAKE=y CONFIG_FAKEIDENTD=y +CONFIG_FTPD=y +CONFIG_FEATURE_FTP_WRITE=y CONFIG_FTPGET=y CONFIG_FTPPUT=y CONFIG_FEATURE_FTPGETPUT_LONG_OPTIONS=y @@ -723,6 +734,7 @@ CONFIG_FEATURE_UDHCP_PORT=y CONFIG_FEATURE_UDHCP_RFC3397=y CONFIG_UDHCPC_DEFAULT_SCRIPT="/usr/share/udhcpc/default.script" CONFIG_UDHCPC_SLACK_FOR_BUGGY_SERVERS=80 +CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS="-R -n" CONFIG_VCONFIG=y CONFIG_WGET=y CONFIG_FEATURE_WGET_STATUSBAR=y @@ -730,6 +742,8 @@ CONFIG_FEATURE_WGET_AUTHENTICATION=y CONFIG_FEATURE_WGET_LONG_OPTIONS=y CONFIG_ZCIP=y CONFIG_TCPSVD=y +CONFIG_TUNCTL=y +CONFIG_FEATURE_TUNCTL_UG=y CONFIG_UDPSVD=y # @@ -749,8 +763,6 @@ CONFIG_FEATURE_POPMAILDIR_DELIVERY=y CONFIG_REFORMIME=y CONFIG_FEATURE_REFORMIME_COMPAT=y CONFIG_SENDMAIL=y -CONFIG_FEATURE_SENDMAIL_MAILX=y -CONFIG_FEATURE_SENDMAIL_MAILXX=y # # Process Utilities @@ -768,7 +780,7 @@ CONFIG_FEATURE_PIDOF_OMIT=y CONFIG_PKILL=y CONFIG_PS=y CONFIG_FEATURE_PS_WIDE=y -CONFIG_FEATURE_PS_TIME=y +# CONFIG_FEATURE_PS_TIME is not set # CONFIG_FEATURE_PS_UNUSUAL_SYSTEMS is not set CONFIG_RENICE=y CONFIG_BB_SYSCTL=y @@ -829,8 +841,6 @@ CONFIG_ASH_JOB_CONTROL=y CONFIG_ASH_READ_NCHARS=y CONFIG_ASH_READ_TIMEOUT=y CONFIG_ASH_ALIAS=y -CONFIG_ASH_MATH_SUPPORT=y -CONFIG_ASH_MATH_SUPPORT_64=y CONFIG_ASH_GETOPTS=y CONFIG_ASH_BUILTIN_ECHO=y CONFIG_ASH_BUILTIN_PRINTF=y @@ -848,12 +858,15 @@ CONFIG_HUSH_TICK=y CONFIG_HUSH_IF=y CONFIG_HUSH_LOOPS=y CONFIG_HUSH_CASE=y +CONFIG_HUSH_FUNCTIONS=y # CONFIG_LASH is not set CONFIG_MSH=y # # Bourne Shell Options # +CONFIG_SH_MATH_SUPPORT=y +CONFIG_SH_MATH_SUPPORT_64=y CONFIG_FEATURE_SH_EXTRA_QUIET=y # CONFIG_FEATURE_SH_STANDALONE is not set # CONFIG_FEATURE_SH_NOFORK is not set diff --git a/shell/Config.in b/shell/Config.in index 9b3ce64..6cc11ce 100644 --- a/shell/Config.in +++ b/shell/Config.in @@ -159,16 +159,15 @@ config HUSH bool "hush" default n help - hush is a very small shell (just 18k) and it has fairly complete - Bourne shell grammar. It even handles all the normal flow control - options such as if/then/elif/else/fi, for/in/do/done, while loops, - case/esac. + hush is a small shell (22k). It handles the normal flow control + constructs such as if/then/elif/else/fi, for/in/do/done, while loops, + case/esac. Redirections, here documents, $((arithmetic)) + and functions are supported. It will compile and work on no-mmu systems. - It does not handle select, functions, here documents ( << - word ), aliases, brace expansion, tilde expansion, - &> and >& redirection of stdout+stderr, etc. + It does not handle select, aliases, brace expansion, + tilde expansion, &>file and >&file redirection of stdout+stderr. config HUSH_HELP bool "help builtin" @@ -226,6 +225,13 @@ config HUSH_CASE help Enable case ... esac statement in hush. +400 bytes. +config HUSH_FUNCTIONS + bool "Support funcname() { commands; } syntax" + default n + depends on HUSH + help + Enable support for shell functions in hush. +800 bytes. + config LASH bool "lash (deprecated: aliased to hush)" default n @@ -237,16 +243,17 @@ config MSH bool "msh (deprecated: please use hush)" default n help - The minix shell (adds just 30k) is quite complete and handles things - like for/do/done, case/esac and all the things you expect a Bourne - shell to do. It is not always pedantically correct about Bourne - shell grammar (try running the shell testscript "tests/sh.testcases" - on it and compare vs bash) but for most things it works quite well. - It uses only vfork, so it can be used on uClinux systems. - msh is deprecated and will be removed, please migrate to hush. If there is a feature msh has but hush does not, please let us know. +# The minix shell (adds just 30k) is quite complete and handles things +# like for/do/done, case/esac and all the things you expect a Bourne +# shell to do. It is not always pedantically correct about Bourne +# shell grammar (try running the shell testscript "tests/sh.testcases" +# on it and compare vs bash) but for most things it works quite well. +# It uses only vfork, so it can be used on uClinux systems. + + comment "Bourne Shell Options" depends on MSH || LASH || HUSH || ASH diff --git a/shell/hush.c b/shell/hush.c index 9c2c0f3..ba3e2c3 100644 --- a/shell/hush.c +++ b/shell/hush.c @@ -83,8 +83,6 @@ * Keeping 1 for now even in released versions. */ #define HUSH_DEBUG 1 -/* In progress... */ -#define ENABLE_HUSH_FUNCTIONS 1 #if BUILD_AS_NOMMU |