#
# For a description of the syntax of this configuration file,
# see scripts/kbuild/config-language.txt.
#

menu "Busybox Library Tuning"

config PASSWORD_MINLEN
	int "Minimum password length"
	default 6
	range 5 32
	help
	  Minimum allowable password length.

config MD5_SIZE_VS_SPEED
	int "MD5: Trade bytes for speed (0:fast, 3:slow)"
	default 2
	range 0 3
	help
	  Trade binary size versus speed for the md5sum algorithm.
	  Approximate values running uClibc and hashing
	  linux-2.4.4.tar.bz2 were:
	                    user times (sec)  text size (386)
	  0 (fastest)         1.1                6144
	  1                   1.4                5392
	  2                   3.0                5088
	  3 (smallest)        5.1                4912

config FEATURE_FAST_TOP
	bool "Faster /proc scanning code (+100 bytes)"
	default n
	help
	  This option makes top (and ps) ~20% faster (or 20% less CPU hungry),
	  but code size is slightly bigger.

config FEATURE_ETC_NETWORKS
	bool "Support for /etc/networks"
	default n
	help
	  Enable support for network names in /etc/networks. This is
	  a rarely used feature which allows you to use names
	  instead of IP/mask pairs in route command.

config FEATURE_EDITING
	bool "Command line editing"
	default n
	help
	  Enable line editing (mainly for shell command line).

config FEATURE_EDITING_MAX_LEN
	int "Maximum length of input"
	range 128 8192
	default 1024
	depends on FEATURE_EDITING
	help
	  Line editing code uses on-stack buffers for storage.
	  You may want to decrease this parameter if your target machine
	  benefits from smaller stack usage.

config FEATURE_EDITING_VI
	bool "vi-style line editing commands"
	default n
	depends on FEATURE_EDITING
	help
	  Enable vi-style line editing. In shells, this mode can be
	  turned on and off with "set -o vi" and "set +o vi".

config FEATURE_EDITING_HISTORY
	int "History size"
	range 0 99999
	default 15
	depends on FEATURE_EDITING
	help
	  Specify command history size.

config FEATURE_EDITING_SAVEHISTORY
	bool "History saving"
	default n
	depends on ASH && FEATURE_EDITING
	help
	  Enable history saving in ash shell.

config FEATURE_TAB_COMPLETION
	bool "Tab completion"
	default n
	depends on FEATURE_EDITING
	help
	  Enable tab completion.

config FEATURE_USERNAME_COMPLETION
	bool "Username completion"
	default n
	depends on FEATURE_TAB_COMPLETION
	help
	  Enable username completion.

config FEATURE_EDITING_FANCY_PROMPT
	bool "Fancy shell prompts"
	default n
	depends on FEATURE_EDITING
	help
	  Setting this option allows for prompts to use things like \w and
	  \$ and escape codes.

config FEATURE_EDITING_ASK_TERMINAL
	bool "Query cursor position from terminal"
	default n
	depends on FEATURE_EDITING
	help
	  Allow usage of "ESC [ 6 n" sequence. Terminal answers back with
	  current cursor position. This information is used to make line
	  editing more robust in some cases.
	  If you are not sure whether your terminals respond to this code
	  correctly, or want to save on code size (about 300 bytes),
	  then do not turn this option on.

config FEATURE_NON_POSIX_CP
	bool "Non-POSIX, but safer, copying to special nodes"
	default y
	help
	  With this option, "cp file symlink" will delete symlink
	  and create a regular file. This does not conform to POSIX,
	  but prevents a symlink attack.
	  Similarly, "cp file device" will not send file's data
	  to the device.

config FEATURE_VERBOSE_CP_MESSAGE
	bool "Give more precise messages when copy fails (cp, mv etc)"
	default n
	help
	  Error messages with this feature enabled:
	    $ cp file /does_not_exist/file
	    cp: cannot create '/does_not_exist/file': Path does not exist
	    $ cp file /vmlinuz/file
	    cp: cannot stat '/vmlinuz/file': Path has non-directory component
	  If this feature is not enabled, they will be, respectively:
	    cp: cannot create '/does_not_exist/file': No such file or directory
	    cp: cannot stat '/vmlinuz/file': Not a directory
	  This will cost you ~60 bytes.

config FEATURE_COPYBUF_KB
	int "Copy buffer size, in kilobytes"
	range 1 1024
	default 4
	help
	  Size of buffer used by cp, mv, install etc.
	  Buffers which are 4 kb or less will be allocated on stack.
	  Bigger buffers will be allocated with mmap, with fallback to 4 kb
	  stack buffer if mmap fails.

config MONOTONIC_SYSCALL
	bool "Use clock_gettime(CLOCK_MONOTONIC) syscall"
	default y
	help
	  Use clock_gettime(CLOCK_MONOTONIC) syscall for measuring
	  time intervals (time, ping, traceroute etc need this).
	  Probably requires Linux 2.6+. If not selected, gettimeofday
	  will be used instead (which gives wrong results if date/time
	  is reset).

config IOCTL_HEX2STR_ERROR
	bool "Use ioctl names rather than hex values in error messages"
	default y
	help
	  Use ioctl names rather than hex values in error messages
	  (e.g. VT_DISALLOCATE rather than 0x5608). If disabled this
	  saves about 1400 bytes.

config FEATURE_HWIB
	bool "Support infiniband HW"
	default y
	help
	  Support for printing infiniband addresses in
	  network applets.

endmenu
