summaryrefslogtreecommitdiff
path: root/package/utils
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2014-05-25 17:42:09 +0000
committerFelix Fietkau <nbd@openwrt.org>2014-05-25 17:42:09 +0000
commitf4f553efa787e1f8f25bb2176f5e6c4c3aa659a9 (patch)
tree310f556f4a68661a07ada2d87790ff02796c941a /package/utils
parenta54791f2baa2e193b5197b754f0b6b29d86d656e (diff)
downloadmtk-20170518-f4f553efa787e1f8f25bb2176f5e6c4c3aa659a9.zip
mtk-20170518-f4f553efa787e1f8f25bb2176f5e6c4c3aa659a9.tar.gz
mtk-20170518-f4f553efa787e1f8f25bb2176f5e6c4c3aa659a9.tar.bz2
busybox: update to 1.22.1
Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 40852
Diffstat (limited to 'package/utils')
-rw-r--r--package/utils/busybox/Config-defaults.in289
-rw-r--r--package/utils/busybox/Makefile6
-rw-r--r--package/utils/busybox/config/Config.in64
-rw-r--r--package/utils/busybox/config/archival/Config.in148
-rw-r--r--package/utils/busybox/config/console-tools/Config.in1
-rw-r--r--package/utils/busybox/config/coreutils/Config.in40
-rw-r--r--package/utils/busybox/config/debianutils/Config.in1
-rw-r--r--package/utils/busybox/config/e2fsprogs/Config.in1
-rw-r--r--package/utils/busybox/config/e2fsprogs/old_e2fsprogs/Config.in1
-rw-r--r--package/utils/busybox/config/editors/Config.in134
-rw-r--r--package/utils/busybox/config/libbb/Config.in25
-rw-r--r--package/utils/busybox/config/loginutils/Config.in18
-rw-r--r--package/utils/busybox/config/mailutils/Config.in1
-rw-r--r--package/utils/busybox/config/miscutils/Config.in44
-rw-r--r--package/utils/busybox/config/modutils/Config.in2
-rw-r--r--package/utils/busybox/config/networking/Config.in40
-rw-r--r--package/utils/busybox/config/networking/udhcp/Config.in7
-rw-r--r--package/utils/busybox/config/printutils/Config.in1
-rw-r--r--package/utils/busybox/config/procps/Config.in123
-rw-r--r--package/utils/busybox/config/runit/Config.in1
-rw-r--r--package/utils/busybox/config/selinux/Config.in1
-rw-r--r--package/utils/busybox/config/shell/Config.in4
-rw-r--r--package/utils/busybox/config/sysklogd/Config.in17
-rw-r--r--package/utils/busybox/config/util-linux/Config.in350
-rw-r--r--package/utils/busybox/config/util-linux/volume_id/Config.in304
-rw-r--r--package/utils/busybox/patches/001-resource_h_include.patch (renamed from package/utils/busybox/patches/005-resource_h_include.patch)0
-rw-r--r--package/utils/busybox/patches/002-passwd_use_md5_hash_by_default_like_it_used_to_be.patch20
-rw-r--r--package/utils/busybox/patches/002-upstream_ash_fix.patch11
-rw-r--r--package/utils/busybox/patches/003-brctl_show_fix.patch37
-rw-r--r--package/utils/busybox/patches/003-upstream_date_fix.patch30
-rw-r--r--package/utils/busybox/patches/004-upstream-percent_decode_in_place.patch237
-rw-r--r--package/utils/busybox/patches/004-upstream_iplink_fix.patch19
-rw-r--r--package/utils/busybox/patches/005-upstream_nc_fix.patch15
-rw-r--r--package/utils/busybox/patches/006-upstream_CVE-2011-2716_fixes.patch164
-rw-r--r--package/utils/busybox/patches/007-upstream_mkfs_ext2_fixes.patch1441
-rw-r--r--package/utils/busybox/patches/008-backport-dd-conv-swab.patch97
-rw-r--r--package/utils/busybox/patches/100-trylink_bash.patch (renamed from package/utils/busybox/patches/140-trylink_bash.patch)0
-rw-r--r--package/utils/busybox/patches/101-gen_build_files_bash.patch (renamed from package/utils/busybox/patches/141-gen_build_files_bash.patch)0
-rw-r--r--package/utils/busybox/patches/110-no_static_libgcc.patch (renamed from package/utils/busybox/patches/150-no_static_libgcc.patch)6
-rw-r--r--package/utils/busybox/patches/110-wget_getopt_fix.patch11
-rw-r--r--package/utils/busybox/patches/120-remove_uclibc_rpc_check.patch (renamed from package/utils/busybox/patches/490-mount_disable_check.patch)2
-rw-r--r--package/utils/busybox/patches/130-mconf_missing_sigwinch.patch (renamed from package/utils/busybox/patches/920-portability.patch)2
-rw-r--r--package/utils/busybox/patches/200-udhcpc_reduce_msgs.patch (renamed from package/utils/busybox/patches/242-udhcpc_msgs.patch)4
-rw-r--r--package/utils/busybox/patches/201-udhcpc_changed_ifindex.patch (renamed from package/utils/busybox/patches/243-udhcpc_changed_ifindex.patch)2
-rw-r--r--package/utils/busybox/patches/202-udhcpc_handle_comcast_ip6rd.patch18
-rw-r--r--package/utils/busybox/patches/203-udhcpc_renew_no_deconfig.patch (renamed from package/utils/busybox/patches/524-udhcpc_renew.patch)2
-rw-r--r--package/utils/busybox/patches/210-add_netmsg_util.patch (renamed from package/utils/busybox/patches/300-netmsg.patch)6
-rw-r--r--package/utils/busybox/patches/220-add_lock_util.patch (renamed from package/utils/busybox/patches/340-lock_util.patch)2
-rw-r--r--package/utils/busybox/patches/230-ntpd_delayed_resolve.patch (renamed from package/utils/busybox/patches/610-ntpd_delayed_resolve.patch)10
-rw-r--r--package/utils/busybox/patches/240-telnetd_intr.patch (renamed from package/utils/busybox/patches/902-telnetd_intr.patch)2
-rw-r--r--package/utils/busybox/patches/240-udhcpc_retries.patch20
-rw-r--r--package/utils/busybox/patches/244-udhcpc_add_6rd_option.patch143
-rw-r--r--package/utils/busybox/patches/250-ash_export-n.patch34
-rw-r--r--package/utils/busybox/patches/250-date-k-flag.patch (renamed from package/utils/busybox/patches/911-date-k-flag.patch)10
-rw-r--r--package/utils/busybox/patches/251-ash_fix-redir-substitution.patch12
-rw-r--r--package/utils/busybox/patches/260-arping_missing_includes.patch (renamed from package/utils/busybox/patches/998-arping_missing_includes.patch)0
-rw-r--r--package/utils/busybox/patches/260-vconfig_proc.patch22
-rw-r--r--package/utils/busybox/patches/611-upstream_ntpd_version_fix.patch29
-rw-r--r--package/utils/busybox/patches/700-hexdump_segfault_fix.patch11
-rw-r--r--package/utils/busybox/patches/950-partial-checksum.patch86
-rw-r--r--package/utils/busybox/patches/999-musl-fixes.patch16
61 files changed, 1068 insertions, 3076 deletions
diff --git a/package/utils/busybox/Config-defaults.in b/package/utils/busybox/Config-defaults.in
index aad6086..20ab190 100644
--- a/package/utils/busybox/Config-defaults.in
+++ b/package/utils/busybox/Config-defaults.in
@@ -91,6 +91,9 @@ config BUSYBOX_DEFAULT_FEATURE_WTMP
config BUSYBOX_DEFAULT_FEATURE_PIDFILE
bool
default y
+config BUSYBOX_DEFAULT_PID_FILE_PATH
+ string
+ default "/var/run"
config BUSYBOX_DEFAULT_FEATURE_SUID
bool
default y
@@ -139,9 +142,18 @@ config BUSYBOX_DEFAULT_LFS
config BUSYBOX_DEFAULT_CROSS_COMPILER_PREFIX
string
default ""
+config BUSYBOX_DEFAULT_SYSROOT
+ string
+ default ""
config BUSYBOX_DEFAULT_EXTRA_CFLAGS
string
default ""
+config BUSYBOX_DEFAULT_EXTRA_LDFLAGS
+ string
+ default ""
+config BUSYBOX_DEFAULT_EXTRA_LDLIBS
+ string
+ default ""
config BUSYBOX_DEFAULT_DEBUG
bool
default n
@@ -193,9 +205,12 @@ config BUSYBOX_DEFAULT_FEATURE_RTMINMAX
config BUSYBOX_DEFAULT_PASSWORD_MINLEN
int
default 6
-config BUSYBOX_DEFAULT_MD5_SIZE_VS_SPEED
+config BUSYBOX_DEFAULT_MD5_SMALL
int
- default 2
+ default 1
+config BUSYBOX_DEFAULT_SHA3_SMALL
+ int
+ default 1
config BUSYBOX_DEFAULT_FEATURE_FAST_TOP
bool
default y
@@ -220,6 +235,9 @@ config BUSYBOX_DEFAULT_FEATURE_EDITING_HISTORY
config BUSYBOX_DEFAULT_FEATURE_EDITING_SAVEHISTORY
bool
default n
+config BUSYBOX_DEFAULT_FEATURE_EDITING_SAVE_ON_EXIT
+ bool
+ default n
config BUSYBOX_DEFAULT_FEATURE_REVERSE_SEARCH
bool
default n
@@ -280,9 +298,30 @@ config BUSYBOX_DEFAULT_FEATURE_AR_LONG_FILENAMES
config BUSYBOX_DEFAULT_FEATURE_AR_CREATE
bool
default n
+config BUSYBOX_DEFAULT_UNCOMPRESS
+ bool
+ default n
+config BUSYBOX_DEFAULT_GUNZIP
+ bool
+ default y
config BUSYBOX_DEFAULT_BUNZIP2
bool
default y
+config BUSYBOX_DEFAULT_UNLZMA
+ bool
+ default n
+config BUSYBOX_DEFAULT_FEATURE_LZMA_FAST
+ bool
+ default n
+config BUSYBOX_DEFAULT_LZMA
+ bool
+ default n
+config BUSYBOX_DEFAULT_UNXZ
+ bool
+ default n
+config BUSYBOX_DEFAULT_XZ
+ bool
+ default n
config BUSYBOX_DEFAULT_BZIP2
bool
default n
@@ -304,25 +343,25 @@ config BUSYBOX_DEFAULT_DPKG_DEB
config BUSYBOX_DEFAULT_FEATURE_DPKG_DEB_EXTRACT_ONLY
bool
default n
-config BUSYBOX_DEFAULT_GUNZIP
- bool
- default y
config BUSYBOX_DEFAULT_GZIP
bool
default y
config BUSYBOX_DEFAULT_FEATURE_GZIP_LONG_OPTIONS
bool
default n
+config BUSYBOX_DEFAULT_GZIP_FAST
+ int
+ default 0
config BUSYBOX_DEFAULT_LZOP
bool
default n
config BUSYBOX_DEFAULT_LZOP_COMPR_HIGH
bool
default n
-config BUSYBOX_DEFAULT_RPM2CPIO
+config BUSYBOX_DEFAULT_RPM
bool
default n
-config BUSYBOX_DEFAULT_RPM
+config BUSYBOX_DEFAULT_RPM2CPIO
bool
default n
config BUSYBOX_DEFAULT_TAR
@@ -361,24 +400,6 @@ config BUSYBOX_DEFAULT_FEATURE_TAR_NOPRESERVE_TIME
config BUSYBOX_DEFAULT_FEATURE_TAR_SELINUX
bool
default n
-config BUSYBOX_DEFAULT_UNCOMPRESS
- bool
- default n
-config BUSYBOX_DEFAULT_UNLZMA
- bool
- default n
-config BUSYBOX_DEFAULT_FEATURE_LZMA_FAST
- bool
- default n
-config BUSYBOX_DEFAULT_LZMA
- bool
- default n
-config BUSYBOX_DEFAULT_UNXZ
- bool
- default n
-config BUSYBOX_DEFAULT_XZ
- bool
- default n
config BUSYBOX_DEFAULT_UNZIP
bool
default n
@@ -400,6 +421,9 @@ config BUSYBOX_DEFAULT_FEATURE_DATE_NANO
config BUSYBOX_DEFAULT_FEATURE_DATE_COMPAT
bool
default n
+config BUSYBOX_DEFAULT_HOSTID
+ bool
+ default y
config BUSYBOX_DEFAULT_ID
bool
default y
@@ -415,6 +439,12 @@ config BUSYBOX_DEFAULT_FEATURE_TEST_64
config BUSYBOX_DEFAULT_TOUCH
bool
default y
+config BUSYBOX_DEFAULT_FEATURE_TOUCH_NODEREF
+ bool
+ default n
+config BUSYBOX_DEFAULT_FEATURE_TOUCH_SUSV3
+ bool
+ default n
config BUSYBOX_DEFAULT_TR
bool
default y
@@ -541,9 +571,6 @@ config BUSYBOX_DEFAULT_HEAD
config BUSYBOX_DEFAULT_FEATURE_FANCY_HEAD
bool
default y
-config BUSYBOX_DEFAULT_HOSTID
- bool
- default y
config BUSYBOX_DEFAULT_INSTALL
bool
default n
@@ -652,6 +679,9 @@ config BUSYBOX_DEFAULT_SHA256SUM
config BUSYBOX_DEFAULT_SHA512SUM
bool
default n
+config BUSYBOX_DEFAULT_SHA3SUM
+ bool
+ default n
config BUSYBOX_DEFAULT_SLEEP
bool
default y
@@ -847,9 +877,36 @@ config BUSYBOX_DEFAULT_FEATURE_START_STOP_DAEMON_LONG_OPTIONS
config BUSYBOX_DEFAULT_WHICH
bool
default y
+config BUSYBOX_DEFAULT_AWK
+ bool
+ default y
+config BUSYBOX_DEFAULT_FEATURE_AWK_LIBM
+ bool
+ default y
+config BUSYBOX_DEFAULT_FEATURE_AWK_GNU_EXTENSIONS
+ bool
+ default y
+config BUSYBOX_DEFAULT_CMP
+ bool
+ default y
+config BUSYBOX_DEFAULT_DIFF
+ bool
+ default n
+config BUSYBOX_DEFAULT_FEATURE_DIFF_LONG_OPTIONS
+ bool
+ default n
+config BUSYBOX_DEFAULT_FEATURE_DIFF_DIR
+ bool
+ default n
+config BUSYBOX_DEFAULT_ED
+ bool
+ default n
config BUSYBOX_DEFAULT_PATCH
bool
default n
+config BUSYBOX_DEFAULT_SED
+ bool
+ default y
config BUSYBOX_DEFAULT_VI
bool
default y
@@ -892,33 +949,6 @@ config BUSYBOX_DEFAULT_FEATURE_VI_WIN_RESIZE
config BUSYBOX_DEFAULT_FEATURE_VI_ASK_TERMINAL
bool
default y
-config BUSYBOX_DEFAULT_FEATURE_VI_OPTIMIZE_CURSOR
- bool
- default y
-config BUSYBOX_DEFAULT_AWK
- bool
- default y
-config BUSYBOX_DEFAULT_FEATURE_AWK_LIBM
- bool
- default y
-config BUSYBOX_DEFAULT_CMP
- bool
- default y
-config BUSYBOX_DEFAULT_DIFF
- bool
- default n
-config BUSYBOX_DEFAULT_FEATURE_DIFF_LONG_OPTIONS
- bool
- default n
-config BUSYBOX_DEFAULT_FEATURE_DIFF_DIR
- bool
- default n
-config BUSYBOX_DEFAULT_ED
- bool
- default n
-config BUSYBOX_DEFAULT_SED
- bool
- default y
config BUSYBOX_DEFAULT_FEATURE_ALLOW_EXEC
bool
default y
@@ -1132,6 +1162,9 @@ config BUSYBOX_DEFAULT_GETTY
config BUSYBOX_DEFAULT_LOGIN
bool
default n
+config BUSYBOX_DEFAULT_LOGIN_SESSION_AS_CHILD
+ bool
+ default n
config BUSYBOX_DEFAULT_PAM
bool
default n
@@ -1156,6 +1189,9 @@ config BUSYBOX_DEFAULT_CRYPTPW
config BUSYBOX_DEFAULT_CHPASSWD
bool
default n
+config BUSYBOX_DEFAULT_FEATURE_DEFAULT_PASSWD_ALGO
+ string
+ default "md5"
config BUSYBOX_DEFAULT_SU
bool
default n
@@ -1255,6 +1291,27 @@ config BUSYBOX_DEFAULT_DEFAULT_DEPMOD_FILE
config BUSYBOX_DEFAULT_BLOCKDEV
bool
default n
+config BUSYBOX_DEFAULT_FSTRIM
+ bool
+ default n
+config BUSYBOX_DEFAULT_MDEV
+ bool
+ default n
+config BUSYBOX_DEFAULT_FEATURE_MDEV_CONF
+ bool
+ default n
+config BUSYBOX_DEFAULT_FEATURE_MDEV_RENAME
+ bool
+ default n
+config BUSYBOX_DEFAULT_FEATURE_MDEV_RENAME_REGEXP
+ bool
+ default n
+config BUSYBOX_DEFAULT_FEATURE_MDEV_EXEC
+ bool
+ default n
+config BUSYBOX_DEFAULT_FEATURE_MDEV_LOAD_FIRMWARE
+ bool
+ default n
config BUSYBOX_DEFAULT_REV
bool
default n
@@ -1384,24 +1441,6 @@ config BUSYBOX_DEFAULT_LSPCI
config BUSYBOX_DEFAULT_LSUSB
bool
default n
-config BUSYBOX_DEFAULT_MDEV
- bool
- default n
-config BUSYBOX_DEFAULT_FEATURE_MDEV_CONF
- bool
- default n
-config BUSYBOX_DEFAULT_FEATURE_MDEV_RENAME
- bool
- default n
-config BUSYBOX_DEFAULT_FEATURE_MDEV_RENAME_REGEXP
- bool
- default n
-config BUSYBOX_DEFAULT_FEATURE_MDEV_EXEC
- bool
- default n
-config BUSYBOX_DEFAULT_FEATURE_MDEV_LOAD_FIRMWARE
- bool
- default n
config BUSYBOX_DEFAULT_MKSWAP
bool
default y
@@ -1489,13 +1528,19 @@ config BUSYBOX_DEFAULT_FEATURE_MTAB_SUPPORT
config BUSYBOX_DEFAULT_VOLUMEID
bool
default n
-config BUSYBOX_DEFAULT_FEATURE_VOLUMEID_EXT
+config BUSYBOX_DEFAULT_FEATURE_VOLUMEID_BTRFS
bool
default n
-config BUSYBOX_DEFAULT_FEATURE_VOLUMEID_BTRFS
+config BUSYBOX_DEFAULT_FEATURE_VOLUMEID_CRAMFS
bool
default n
-config BUSYBOX_DEFAULT_FEATURE_VOLUMEID_REISERFS
+config BUSYBOX_DEFAULT_FEATURE_VOLUMEID_EXFAT
+ bool
+ default n
+config BUSYBOX_DEFAULT_FEATURE_VOLUMEID_EXT
+ bool
+ default n
+config BUSYBOX_DEFAULT_FEATURE_VOLUMEID_F2FS
bool
default n
config BUSYBOX_DEFAULT_FEATURE_VOLUMEID_FAT
@@ -1504,40 +1549,46 @@ config BUSYBOX_DEFAULT_FEATURE_VOLUMEID_FAT
config BUSYBOX_DEFAULT_FEATURE_VOLUMEID_HFS
bool
default n
+config BUSYBOX_DEFAULT_FEATURE_VOLUMEID_ISO9660
+ bool
+ default n
config BUSYBOX_DEFAULT_FEATURE_VOLUMEID_JFS
bool
default n
-config BUSYBOX_DEFAULT_FEATURE_VOLUMEID_XFS
+config BUSYBOX_DEFAULT_FEATURE_VOLUMEID_LINUXRAID
bool
default n
-config BUSYBOX_DEFAULT_FEATURE_VOLUMEID_NTFS
+config BUSYBOX_DEFAULT_FEATURE_VOLUMEID_LINUXSWAP
bool
default n
-config BUSYBOX_DEFAULT_FEATURE_VOLUMEID_ISO9660
+config BUSYBOX_DEFAULT_FEATURE_VOLUMEID_LUKS
bool
default n
-config BUSYBOX_DEFAULT_FEATURE_VOLUMEID_UDF
+config BUSYBOX_DEFAULT_FEATURE_VOLUMEID_NILFS
bool
default n
-config BUSYBOX_DEFAULT_FEATURE_VOLUMEID_LUKS
+config BUSYBOX_DEFAULT_FEATURE_VOLUMEID_NTFS
bool
default n
-config BUSYBOX_DEFAULT_FEATURE_VOLUMEID_LINUXSWAP
+config BUSYBOX_DEFAULT_FEATURE_VOLUMEID_OCFS2
bool
default n
-config BUSYBOX_DEFAULT_FEATURE_VOLUMEID_CRAMFS
+config BUSYBOX_DEFAULT_FEATURE_VOLUMEID_REISERFS
bool
default n
config BUSYBOX_DEFAULT_FEATURE_VOLUMEID_ROMFS
bool
default n
+config BUSYBOX_DEFAULT_FEATURE_VOLUMEID_SQUASHFS
+ bool
+ default n
config BUSYBOX_DEFAULT_FEATURE_VOLUMEID_SYSV
bool
default n
-config BUSYBOX_DEFAULT_FEATURE_VOLUMEID_OCFS2
+config BUSYBOX_DEFAULT_FEATURE_VOLUMEID_UDF
bool
default n
-config BUSYBOX_DEFAULT_FEATURE_VOLUMEID_LINUXRAID
+config BUSYBOX_DEFAULT_FEATURE_VOLUMEID_XFS
bool
default n
config BUSYBOX_DEFAULT_CONSPY
@@ -1579,6 +1630,9 @@ config BUSYBOX_DEFAULT_NANDWRITE
config BUSYBOX_DEFAULT_NANDDUMP
bool
default n
+config BUSYBOX_DEFAULT_RFKILL
+ bool
+ default n
config BUSYBOX_DEFAULT_SETSERIAL
bool
default n
@@ -1600,6 +1654,9 @@ config BUSYBOX_DEFAULT_UBIRSVOL
config BUSYBOX_DEFAULT_UBIUPDATEVOL
bool
default n
+config BUSYBOX_DEFAULT_WALL
+ bool
+ default n
config BUSYBOX_DEFAULT_ADJTIMEX
bool
default n
@@ -1656,7 +1713,7 @@ config BUSYBOX_DEFAULT_FEATURE_CROND_CALL_SENDMAIL
default n
config BUSYBOX_DEFAULT_FEATURE_CROND_DIR
string
- default "/etc"
+ default "/var/spool/cron"
config BUSYBOX_DEFAULT_CRONTAB
bool
default y
@@ -1771,9 +1828,6 @@ config BUSYBOX_DEFAULT_RAIDAUTORUN
config BUSYBOX_DEFAULT_READAHEAD
bool
default n
-config BUSYBOX_DEFAULT_RFKILL
- bool
- default n
config BUSYBOX_DEFAULT_RUNLEVEL
bool
default n
@@ -1804,9 +1858,6 @@ config BUSYBOX_DEFAULT_TTYSIZE
config BUSYBOX_DEFAULT_VOLNAME
bool
default n
-config BUSYBOX_DEFAULT_WALL
- bool
- default n
config BUSYBOX_DEFAULT_WATCHDOG
bool
default n
@@ -2152,6 +2203,9 @@ config BUSYBOX_DEFAULT_TUNCTL
config BUSYBOX_DEFAULT_FEATURE_TUNCTL_UG
bool
default n
+config BUSYBOX_DEFAULT_UDHCPC6
+ bool
+ default n
config BUSYBOX_DEFAULT_UDHCPD
bool
default n
@@ -2254,6 +2308,9 @@ config BUSYBOX_DEFAULT_SENDMAIL
config BUSYBOX_DEFAULT_IOSTAT
bool
default n
+config BUSYBOX_DEFAULT_LSOF
+ bool
+ default n
config BUSYBOX_DEFAULT_MPSTAT
bool
default n
@@ -2275,6 +2332,27 @@ config BUSYBOX_DEFAULT_PWDX
config BUSYBOX_DEFAULT_SMEMCAP
bool
default n
+config BUSYBOX_DEFAULT_TOP
+ bool
+ default y
+config BUSYBOX_DEFAULT_FEATURE_TOP_CPU_USAGE_PERCENTAGE
+ bool
+ default y
+config BUSYBOX_DEFAULT_FEATURE_TOP_CPU_GLOBAL_PERCENTS
+ bool
+ default y
+config BUSYBOX_DEFAULT_FEATURE_TOP_SMP_CPU
+ bool
+ default n
+config BUSYBOX_DEFAULT_FEATURE_TOP_DECIMALS
+ bool
+ default n
+config BUSYBOX_DEFAULT_FEATURE_TOP_SMP_PROCESS
+ bool
+ default n
+config BUSYBOX_DEFAULT_FEATURE_TOPMEM
+ bool
+ default n
config BUSYBOX_DEFAULT_UPTIME
bool
default y
@@ -2317,6 +2395,9 @@ config BUSYBOX_DEFAULT_PS
config BUSYBOX_DEFAULT_FEATURE_PS_WIDE
bool
default y
+config BUSYBOX_DEFAULT_FEATURE_PS_LONG
+ bool
+ default n
config BUSYBOX_DEFAULT_FEATURE_PS_TIME
bool
default n
@@ -2332,27 +2413,6 @@ config BUSYBOX_DEFAULT_RENICE
config BUSYBOX_DEFAULT_BB_SYSCTL
bool
default y
-config BUSYBOX_DEFAULT_TOP
- bool
- default y
-config BUSYBOX_DEFAULT_FEATURE_TOP_CPU_USAGE_PERCENTAGE
- bool
- default y
-config BUSYBOX_DEFAULT_FEATURE_TOP_CPU_GLOBAL_PERCENTS
- bool
- default y
-config BUSYBOX_DEFAULT_FEATURE_TOP_SMP_CPU
- bool
- default n
-config BUSYBOX_DEFAULT_FEATURE_TOP_DECIMALS
- bool
- default n
-config BUSYBOX_DEFAULT_FEATURE_TOP_SMP_PROCESS
- bool
- default n
-config BUSYBOX_DEFAULT_FEATURE_TOPMEM
- bool
- default n
config BUSYBOX_DEFAULT_FEATURE_SHOW_THREADS
bool
default n
@@ -2599,6 +2659,9 @@ config BUSYBOX_DEFAULT_LOGREAD
config BUSYBOX_DEFAULT_FEATURE_LOGREAD_REDUCED_LOCKING
bool
default n
+config BUSYBOX_DEFAULT_FEATURE_KMSG_SYSLOG
+ bool
+ default n
config BUSYBOX_DEFAULT_KLOGD
bool
default n
diff --git a/package/utils/busybox/Makefile b/package/utils/busybox/Makefile
index 4fc89bb..6dbd54d 100644
--- a/package/utils/busybox/Makefile
+++ b/package/utils/busybox/Makefile
@@ -8,14 +8,14 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=busybox
-PKG_VERSION:=1.19.4
-PKG_RELEASE:=7
+PKG_VERSION:=1.22.1
+PKG_RELEASE:=1
PKG_FLAGS:=essential
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=http://www.busybox.net/downloads \
http://distfiles.gentoo.org/distfiles/
-PKG_MD5SUM:=9c0cae5a0379228e7b55e5b29528df8e
+PKG_MD5SUM:=337d1a15ab1cb1d4ed423168b1eb7d7e
PKG_BUILD_DEPENDS:=BUSYBOX_USE_LIBRPC:librpc
PKG_BUILD_PARALLEL:=1
diff --git a/package/utils/busybox/config/Config.in b/package/utils/busybox/config/Config.in
index 25892ff..71ba45b 100644
--- a/package/utils/busybox/config/Config.in
+++ b/package/utils/busybox/config/Config.in
@@ -82,20 +82,21 @@ config BUSYBOX_CONFIG_FEATURE_BUFFERS_GO_IN_BSS
endchoice
config BUSYBOX_CONFIG_SHOW_USAGE
- bool "Show terse applet usage messages"
+ bool "Show applet usage messages"
default BUSYBOX_DEFAULT_SHOW_USAGE
help
- All BusyBox applets will show help messages when invoked with
- wrong arguments. You can turn off printing these terse usage
- messages if you say no here.
- This will save you up to 7k.
+ Enabling this option, BusyBox applets will show terse help messages
+ when invoked with wrong arguments.
+ If you do not want to show any (helpful) usage message when
+ issuing wrong command syntax, you can say 'N' here,
+ saving approximately 7k.
config BUSYBOX_CONFIG_FEATURE_VERBOSE_USAGE
bool "Show verbose applet usage messages"
default BUSYBOX_DEFAULT_FEATURE_VERBOSE_USAGE
depends on BUSYBOX_CONFIG_SHOW_USAGE
help
- All BusyBox applets will show more verbose help messages when
+ All BusyBox applets will show verbose help messages when
busybox is invoked with --help. This will add a lot of text to the
busybox binary. In the default configuration, this will add about
13k, but it can add much more depending on your configuration.
@@ -105,8 +106,8 @@ config BUSYBOX_CONFIG_FEATURE_COMPRESS_USAGE
default BUSYBOX_DEFAULT_FEATURE_COMPRESS_USAGE
depends on BUSYBOX_CONFIG_SHOW_USAGE
help
- Store usage messages in compressed form, uncompress them on-the-fly
- when <applet> --help is called.
+ Store usage messages in .bz compressed form, uncompress them
+ on-the-fly when <applet> --help is called.
If you have a really tiny busybox with few applets enabled (and
bunzip2 isn't one of them), the overhead of the decompressor might
@@ -159,12 +160,13 @@ config BUSYBOX_CONFIG_UNICODE_USING_LOCALE
Internal implementation is smaller.
config BUSYBOX_CONFIG_FEATURE_CHECK_UNICODE_IN_ENV
- bool "Check $LANG environment variable"
+ bool "Check $LC_ALL, $LC_CTYPE and $LANG environment variables"
default BUSYBOX_DEFAULT_FEATURE_CHECK_UNICODE_IN_ENV
depends on BUSYBOX_CONFIG_UNICODE_SUPPORT && !BUSYBOX_CONFIG_UNICODE_USING_LOCALE
help
With this option on, Unicode support is activated
- only if LANG variable has the value of the form "xxxx.utf8"
+ only if locale-related variables have the value of the form
+ "xxxx.utf8"
Otherwise, Unicode support will be always enabled and active.
@@ -308,7 +310,18 @@ config BUSYBOX_CONFIG_FEATURE_PIDFILE
default BUSYBOX_DEFAULT_FEATURE_PIDFILE
help
This option makes some applets (e.g. crond, syslogd, inetd) write
- a pidfile in /var/run. Some applications rely on them.
+ a pidfile at the configured PID_FILE_PATH. It has no effect
+ on applets which require pidfiles to run.
+
+config BUSYBOX_CONFIG_PID_FILE_PATH
+ string "Path to directory for pidfile"
+ default BUSYBOX_DEFAULT_PID_FILE_PATH
+ depends on BUSYBOX_CONFIG_FEATURE_PIDFILE
+ help
+ This is the default path where pidfiles are created. Applets which
+ allow you to set the pidfile path on the command line will override
+ this value. The option has no effect on applets that require you to
+ specify a pidfile path.
config BUSYBOX_CONFIG_FEATURE_SUID
bool "Support for SUID/SGID handling"
@@ -319,7 +332,7 @@ config BUSYBOX_CONFIG_FEATURE_SUID
root-level operations even when run by ordinary users
(for example, mounting of user mounts in fstab needs this).
- Busybox will automatically drop priviledges for applets
+ Busybox will automatically drop privileges for applets
that don't need root access.
If you are really paranoid and don't want to do this, build two
@@ -598,12 +611,39 @@ config BUSYBOX_CONFIG_CROSS_COMPILER_PREFIX
Native builds leave this empty.
+config BUSYBOX_CONFIG_SYSROOT
+ string "Path to sysroot"
+ default BUSYBOX_DEFAULT_SYSROOT
+ help
+ If you want to build BusyBox with a cross compiler, then you
+ might also need to specify where /usr/include and /usr/lib
+ will be found.
+
+ For example, BusyBox can be built against an installed
+ Android NDK, platform version 9, for ARM ABI with
+
+ CONFIG_SYSROOT=/opt/android-ndk/platforms/android-9/arch-arm
+
+ Native builds leave this empty.
+
config BUSYBOX_CONFIG_EXTRA_CFLAGS
string "Additional CFLAGS"
default BUSYBOX_DEFAULT_EXTRA_CFLAGS
help
Additional CFLAGS to pass to the compiler verbatim.
+config BUSYBOX_CONFIG_EXTRA_LDFLAGS
+ string "Additional LDFLAGS"
+ default BUSYBOX_DEFAULT_EXTRA_LDFLAGS
+ help
+ Additional LDFLAGS to pass to the linker verbatim.
+
+config BUSYBOX_CONFIG_EXTRA_LDLIBS
+ string "Additional LDLIBS"
+ default BUSYBOX_DEFAULT_EXTRA_LDLIBS
+ help
+ Additional LDLIBS to pass to the linker with -l.
+
endmenu
menu 'Debugging Options'
diff --git a/package/utils/busybox/config/archival/Config.in b/package/utils/busybox/config/archival/Config.in
index b178d0c..e977bb4 100644
--- a/package/utils/busybox/config/archival/Config.in
+++ b/package/utils/busybox/config/archival/Config.in
@@ -6,8 +6,6 @@
menu "Archival Utilities"
-
-
config BUSYBOX_CONFIG_FEATURE_SEAMLESS_XZ
bool "Make tar, rpm, modprobe etc understand .xz data"
default BUSYBOX_DEFAULT_FEATURE_SEAMLESS_XZ
@@ -33,10 +31,10 @@ config BUSYBOX_CONFIG_FEATURE_SEAMLESS_GZ
Make tar, rpm, modprobe etc understand .gz data.
config BUSYBOX_CONFIG_FEATURE_SEAMLESS_Z
- bool "Make tar and gunzip understand .Z data"
+ bool "tar, rpm, modprobe etc understand .Z data"
default BUSYBOX_DEFAULT_FEATURE_SEAMLESS_Z
help
- Make tar and gunzip understand .Z data.
+ Make tar, rpm, modprobe etc understand .Z data.
config BUSYBOX_CONFIG_AR
bool "ar"
@@ -77,7 +75,19 @@ config BUSYBOX_CONFIG_FEATURE_AR_CREATE
depends on BUSYBOX_CONFIG_AR
help
This enables archive creation (-c and -r) with busybox ar.
-
+config BUSYBOX_CONFIG_UNCOMPRESS
+ bool "uncompress"
+ default BUSYBOX_DEFAULT_UNCOMPRESS
+ help
+ uncompress is used to decompress archives created by compress.
+ Not much used anymore, replaced by gzip/gunzip.
+config BUSYBOX_CONFIG_GUNZIP
+ bool "gunzip"
+ default BUSYBOX_DEFAULT_GUNZIP
+ help
+ gunzip is used to decompress archives created by gzip.
+ You can use the `-t' option to test the integrity of
+ an archive, without decompressing it.
config BUSYBOX_CONFIG_BUNZIP2
bool "bunzip2"
default BUSYBOX_DEFAULT_BUNZIP2
@@ -90,7 +100,46 @@ config BUSYBOX_CONFIG_BUNZIP2
Unless you have a specific application which requires bunzip2, you
should probably say N here.
+config BUSYBOX_CONFIG_UNLZMA
+ bool "unlzma"
+ default BUSYBOX_DEFAULT_UNLZMA
+ help
+ unlzma is a compression utility using the Lempel-Ziv-Markov chain
+ compression algorithm, and range coding. Compression
+ is generally considerably better than that achieved by the bzip2
+ compressors.
+
+ The BusyBox unlzma applet is limited to decompression only.
+ On an x86 system, this applet adds about 4K.
+config BUSYBOX_CONFIG_FEATURE_LZMA_FAST
+ bool "Optimize unlzma for speed"
+ default BUSYBOX_DEFAULT_FEATURE_LZMA_FAST
+ depends on BUSYBOX_CONFIG_UNLZMA
+ help
+ This option reduces decompression time by about 25% at the cost of
+ a 1K bigger binary.
+
+config BUSYBOX_CONFIG_LZMA
+ bool "Provide lzma alias which supports only unpacking"
+ default BUSYBOX_DEFAULT_LZMA
+ depends on BUSYBOX_CONFIG_UNLZMA
+ help
+ Enable this option if you want commands like "lzma -d" to work.
+ IOW: you'll get lzma applet, but it will always require -d option.
+config BUSYBOX_CONFIG_UNXZ
+ bool "unxz"
+ default BUSYBOX_DEFAULT_UNXZ
+ help
+ unxz is a unlzma successor.
+
+config BUSYBOX_CONFIG_XZ
+ bool "Provide xz alias which supports only unpacking"
+ default BUSYBOX_DEFAULT_XZ
+ depends on BUSYBOX_CONFIG_UNXZ
+ help
+ Enable this option if you want commands like "xz -d" to work.
+ IOW: you'll get xz applet, but it will always require -d option.
config BUSYBOX_CONFIG_BZIP2
bool "bzip2"
default BUSYBOX_DEFAULT_BZIP2
@@ -103,7 +152,6 @@ config BUSYBOX_CONFIG_BZIP2
Unless you have a specific application which requires bzip2, you
should probably say N here.
-
config BUSYBOX_CONFIG_CPIO
bool "cpio"
default BUSYBOX_DEFAULT_CPIO
@@ -132,7 +180,6 @@ config BUSYBOX_CONFIG_FEATURE_CPIO_P
depends on BUSYBOX_CONFIG_FEATURE_CPIO_O
help
Passthrough mode. Rarely used.
-
config BUSYBOX_CONFIG_DPKG
bool "dpkg"
default BUSYBOX_DEFAULT_DPKG
@@ -143,7 +190,6 @@ config BUSYBOX_CONFIG_DPKG
This implementation of dpkg has a number of limitations,
you should use the official dpkg if possible.
-
config BUSYBOX_CONFIG_DPKG_DEB
bool "dpkg_deb"
default BUSYBOX_DEFAULT_DPKG_DEB
@@ -165,15 +211,6 @@ config BUSYBOX_CONFIG_FEATURE_DPKG_DEB_EXTRACT_ONLY
"ar -p <deb> data.tar.gz | tar -zx". However it saves space as none
of the extra dpkg-deb, ar or tar options are needed, they are linked
to internally.
-
-config BUSYBOX_CONFIG_GUNZIP
- bool "gunzip"
- default BUSYBOX_DEFAULT_GUNZIP
- help
- gunzip is used to decompress archives created by gzip.
- You can use the `-t' option to test the integrity of
- an archive, without decompressing it.
-
config BUSYBOX_CONFIG_GZIP
bool "gzip"
default BUSYBOX_DEFAULT_GZIP
@@ -188,6 +225,17 @@ config BUSYBOX_CONFIG_FEATURE_GZIP_LONG_OPTIONS
help
Enable use of long options, increases size by about 106 Bytes
+config BUSYBOX_CONFIG_GZIP_FAST
+ int "Trade memory for gzip speed (0:small,slow - 2:fast,big)"
+ default BUSYBOX_DEFAULT_GZIP_FAST
+ range 0 2
+ depends on BUSYBOX_CONFIG_GZIP
+ help
+ Enable big memory options for gzip.
+ 0: small buffers, small hash-tables
+ 1: larger buffers, larger hash-tables
+ 2: larger buffers, largest hash-tables
+ Larger models may give slightly better compression
config BUSYBOX_CONFIG_LZOP
bool "lzop"
default BUSYBOX_DEFAULT_LZOP
@@ -202,19 +250,16 @@ config BUSYBOX_CONFIG_LZOP_COMPR_HIGH
High levels (7,8,9) of lzop compression. These levels
are actually slower than gzip at equivalent compression ratios
and take up 3.2K of code.
-
-config BUSYBOX_CONFIG_RPM2CPIO
- bool "rpm2cpio"
- default BUSYBOX_DEFAULT_RPM2CPIO
- help
- Converts a RPM file into a CPIO archive.
-
config BUSYBOX_CONFIG_RPM
bool "rpm"
default BUSYBOX_DEFAULT_RPM
help
Mini RPM applet - queries and extracts RPM packages.
-
+config BUSYBOX_CONFIG_RPM2CPIO
+ bool "rpm2cpio"
+ default BUSYBOX_DEFAULT_RPM2CPIO
+ help
+ Converts a RPM file into a CPIO archive.
config BUSYBOX_CONFIG_TAR
bool "tar"
default BUSYBOX_DEFAULT_TAR
@@ -314,59 +359,6 @@ config BUSYBOX_CONFIG_FEATURE_TAR_SELINUX
help
With this option busybox supports restoring SELinux labels
when extracting files from tar archives.
-
-config BUSYBOX_CONFIG_UNCOMPRESS
- bool "uncompress"
- default BUSYBOX_DEFAULT_UNCOMPRESS
- help
- uncompress is used to decompress archives created by compress.
- Not much used anymore, replaced by gzip/gunzip.
-
-config BUSYBOX_CONFIG_UNLZMA
- bool "unlzma"
- default BUSYBOX_DEFAULT_UNLZMA
- help
- unlzma is a compression utility using the Lempel-Ziv-Markov chain
- compression algorithm, and range coding. Compression
- is generally considerably better than that achieved by the bzip2
- compressors.
-
- The BusyBox unlzma applet is limited to de-compression only.
- On an x86 system, this applet adds about 4K.
-
- Unless you have a specific application which requires unlzma, you
- should probably say N here.
-
-config BUSYBOX_CONFIG_FEATURE_LZMA_FAST
- bool "Optimize unlzma for speed"
- default BUSYBOX_DEFAULT_FEATURE_LZMA_FAST
- depends on BUSYBOX_CONFIG_UNLZMA
- help
- This option reduces decompression time by about 25% at the cost of
- a 1K bigger binary.
-
-config BUSYBOX_CONFIG_LZMA
- bool "Provide lzma alias which supports only unpacking"
- default BUSYBOX_DEFAULT_LZMA
- depends on BUSYBOX_CONFIG_UNLZMA
- help
- Enable this option if you want commands like "lzma -d" to work.
- IOW: you'll get lzma applet, but it will always require -d option.
-
-config BUSYBOX_CONFIG_UNXZ
- bool "unxz"
- default BUSYBOX_DEFAULT_UNXZ
- help
- unxz is a unlzma successor.
-
-config BUSYBOX_CONFIG_XZ
- bool "Provide xz alias which supports only unpacking"
- default BUSYBOX_DEFAULT_XZ
- depends on BUSYBOX_CONFIG_UNXZ
- help
- Enable this option if you want commands like "xz -d" to work.
- IOW: you'll get xz applet, but it will always require -d option.
-
config BUSYBOX_CONFIG_UNZIP
bool "unzip"
default BUSYBOX_DEFAULT_UNZIP
diff --git a/package/utils/busybox/config/console-tools/Config.in b/package/utils/busybox/config/console-tools/Config.in
index 43ff71c..53937d2 100644
--- a/package/utils/busybox/config/console-tools/Config.in
+++ b/package/utils/busybox/config/console-tools/Config.in
@@ -7,7 +7,6 @@
menu "Console Utilities"
-
config BUSYBOX_CONFIG_CHVT
bool "chvt"
default BUSYBOX_DEFAULT_CHVT
diff --git a/package/utils/busybox/config/coreutils/Config.in b/package/utils/busybox/config/coreutils/Config.in
index e98c0ca..c00eca9 100644
--- a/package/utils/busybox/config/coreutils/Config.in
+++ b/package/utils/busybox/config/coreutils/Config.in
@@ -58,6 +58,12 @@ config BUSYBOX_CONFIG_FEATURE_DATE_COMPAT
With this option off, 'date DATE' is 'date -s DATE' support
the same format. With it on, 'date DATE' additionally supports
MMDDhhmm[[YY]YY][.ss] format.
+config BUSYBOX_CONFIG_HOSTID
+ bool "hostid"
+ default BUSYBOX_DEFAULT_HOSTID
+ help
+ hostid prints the numeric identifier (in hexadecimal) for
+ the current host.
config BUSYBOX_CONFIG_ID
bool "id"
default BUSYBOX_DEFAULT_ID
@@ -88,6 +94,21 @@ config BUSYBOX_CONFIG_TOUCH
help
touch is used to create or change the access and/or
modification timestamp of specified files.
+
+config BUSYBOX_CONFIG_FEATURE_TOUCH_NODEREF
+ bool "Add support for -h"
+ default BUSYBOX_DEFAULT_FEATURE_TOUCH_NODEREF
+ depends on BUSYBOX_CONFIG_TOUCH
+ help
+ Enable touch to have the -h option.
+ This requires libc support for lutimes() function.
+
+config BUSYBOX_CONFIG_FEATURE_TOUCH_SUSV3
+ bool "Add support for SUSV3 features (-d -t -r)"
+ default BUSYBOX_DEFAULT_FEATURE_TOUCH_SUSV3
+ depends on BUSYBOX_CONFIG_TOUCH
+ help
+ Enable touch to use a reference file or a given date/time argument.
config BUSYBOX_CONFIG_TR
bool "tr"
default BUSYBOX_DEFAULT_TR
@@ -393,13 +414,6 @@ config BUSYBOX_CONFIG_FEATURE_FANCY_HEAD
help
This enables the head options (-c, -q, and -v).
-config BUSYBOX_CONFIG_HOSTID
- bool "hostid"
- default BUSYBOX_DEFAULT_HOSTID
- help
- hostid prints the numeric identifier (in hexadecimal) for
- the current host.
-
config BUSYBOX_CONFIG_INSTALL
bool "install"
default BUSYBOX_DEFAULT_INSTALL
@@ -645,6 +659,12 @@ config BUSYBOX_CONFIG_SHA512SUM
help
Compute and check SHA512 message digest
+config BUSYBOX_CONFIG_SHA3SUM
+ bool "sha3sum"
+ default BUSYBOX_DEFAULT_SHA3SUM
+ help
+ Compute and check SHA3 (512-bit) message digest
+
config BUSYBOX_CONFIG_SLEEP
bool "sleep"
default BUSYBOX_DEFAULT_SLEEP
@@ -897,13 +917,13 @@ config BUSYBOX_CONFIG_FEATURE_HUMAN_READABLE
help
Allow df, du, and ls to have human readable output.
-comment "Common options for md5sum, sha1sum, sha256sum, sha512sum"
- depends on BUSYBOX_CONFIG_MD5SUM || BUSYBOX_CONFIG_SHA1SUM || BUSYBOX_CONFIG_SHA256SUM || BUSYBOX_CONFIG_SHA512SUM
+comment "Common options for md5sum, sha1sum, sha256sum, sha512sum, sha3sum"
+ depends on BUSYBOX_CONFIG_MD5SUM || BUSYBOX_CONFIG_SHA1SUM || BUSYBOX_CONFIG_SHA256SUM || BUSYBOX_CONFIG_SHA512SUM || BUSYBOX_CONFIG_SHA3SUM
config BUSYBOX_CONFIG_FEATURE_MD5_SHA1_SUM_CHECK
bool "Enable -c, -s and -w options"
default BUSYBOX_DEFAULT_FEATURE_MD5_SHA1_SUM_CHECK
- depends on BUSYBOX_CONFIG_MD5SUM || BUSYBOX_CONFIG_SHA1SUM || BUSYBOX_CONFIG_SHA256SUM || BUSYBOX_CONFIG_SHA512SUM
+ depends on BUSYBOX_CONFIG_MD5SUM || BUSYBOX_CONFIG_SHA1SUM || BUSYBOX_CONFIG_SHA256SUM || BUSYBOX_CONFIG_SHA512SUM || BUSYBOX_CONFIG_SHA3SUM
help
Enabling the -c options allows files to be checked
against pre-calculated hash values.
diff --git a/package/utils/busybox/config/debianutils/Config.in b/package/utils/busybox/config/debianutils/Config.in
index da18af1..533ad47 100644
--- a/package/utils/busybox/config/debianutils/Config.in
+++ b/package/utils/busybox/config/debianutils/Config.in
@@ -7,7 +7,6 @@
menu "Debian Utilities"
-
config BUSYBOX_CONFIG_MKTEMP
bool "mktemp"
default BUSYBOX_DEFAULT_MKTEMP
diff --git a/package/utils/busybox/config/e2fsprogs/Config.in b/package/utils/busybox/config/e2fsprogs/Config.in
index e200bfc..f826240 100644
--- a/package/utils/busybox/config/e2fsprogs/Config.in
+++ b/package/utils/busybox/config/e2fsprogs/Config.in
@@ -7,7 +7,6 @@
menu "Linux Ext2 FS Progs"
-
config BUSYBOX_CONFIG_CHATTR
bool "chattr"
default BUSYBOX_DEFAULT_CHATTR
diff --git a/package/utils/busybox/config/e2fsprogs/old_e2fsprogs/Config.in b/package/utils/busybox/config/e2fsprogs/old_e2fsprogs/Config.in
index a0ba296..d7a5396 100644
--- a/package/utils/busybox/config/e2fsprogs/old_e2fsprogs/Config.in
+++ b/package/utils/busybox/config/e2fsprogs/old_e2fsprogs/Config.in
@@ -7,7 +7,6 @@
menu "Linux Ext2 FS Progs"
-
config BUSYBOX_CONFIG_CHATTR
bool "chattr"
default BUSYBOX_DEFAULT_CHATTR
diff --git a/package/utils/busybox/config/editors/Config.in b/package/utils/busybox/config/editors/Config.in
index 3956156..90f9f00 100644
--- a/package/utils/busybox/config/editors/Config.in
+++ b/package/utils/busybox/config/editors/Config.in
@@ -6,11 +6,77 @@
menu "Editors"
+config BUSYBOX_CONFIG_AWK
+ bool "awk"
+ default BUSYBOX_DEFAULT_AWK
+ help
+ Awk is used as a pattern scanning and processing language. This is
+ the BusyBox implementation of that programming language.
+
+config BUSYBOX_CONFIG_FEATURE_AWK_LIBM
+ bool "Enable math functions (requires libm)"
+ default BUSYBOX_DEFAULT_FEATURE_AWK_LIBM
+ depends on BUSYBOX_CONFIG_AWK
+ help
+ Enable math functions of the Awk programming language.
+ NOTE: This will require libm to be present for linking.
+
+config BUSYBOX_CONFIG_FEATURE_AWK_GNU_EXTENSIONS
+ bool "Enable a few GNU extensions"
+ default BUSYBOX_DEFAULT_FEATURE_AWK_GNU_EXTENSIONS
+ depends on BUSYBOX_CONFIG_AWK
+ help
+ Enable a few features from gawk:
+ * command line option -e AWK_PROGRAM
+ * simultaneous use of -f and -e on the command line.
+ This enables the use of awk library files.
+ Ex: awk -f mylib.awk -e '{print myfunction($1);}' ...
+config BUSYBOX_CONFIG_CMP
+ bool "cmp"
+ default BUSYBOX_DEFAULT_CMP
+ help
+ cmp is used to compare two files and returns the result
+ to standard output.
+config BUSYBOX_CONFIG_DIFF
+ bool "diff"
+ default BUSYBOX_DEFAULT_DIFF
+ help
+ diff compares two files or directories and outputs the
+ differences between them in a form that can be given to
+ the patch command.
+
+config BUSYBOX_CONFIG_FEATURE_DIFF_LONG_OPTIONS
+ bool "Enable long options"
+ default BUSYBOX_DEFAULT_FEATURE_DIFF_LONG_OPTIONS
+ depends on BUSYBOX_CONFIG_DIFF && BUSYBOX_CONFIG_LONG_OPTS
+ help
+ Enable use of long options.
+
+config BUSYBOX_CONFIG_FEATURE_DIFF_DIR
+ bool "Enable directory support"
+ default BUSYBOX_DEFAULT_FEATURE_DIFF_DIR
+ depends on BUSYBOX_CONFIG_DIFF
+ help
+ This option enables support for directory and subdirectory
+ comparison.
+config BUSYBOX_CONFIG_ED
+ bool "ed"
+ default BUSYBOX_DEFAULT_ED
+ help
+ The original 1970's Unix text editor, from the days of teletypes.
+ Small, simple, evil. Part of SUSv3. If you're not already using
+ this, you don't need it.
config BUSYBOX_CONFIG_PATCH
bool "patch"
default BUSYBOX_DEFAULT_PATCH
help
Apply a unified diff formatted patch.
+config BUSYBOX_CONFIG_SED
+ bool "sed"
+ default BUSYBOX_DEFAULT_SED
+ help
+ sed is used to perform text transformations on a file
+ or input from a pipeline.
config BUSYBOX_CONFIG_VI
bool "vi"
default BUSYBOX_DEFAULT_VI
@@ -127,74 +193,6 @@ config BUSYBOX_CONFIG_FEATURE_VI_ASK_TERMINAL
This is not clean but helps a lot on serial lines and such.
-config BUSYBOX_CONFIG_FEATURE_VI_OPTIMIZE_CURSOR
- bool "Optimize cursor movement"
- default BUSYBOX_DEFAULT_FEATURE_VI_OPTIMIZE_CURSOR
- depends on BUSYBOX_CONFIG_VI
- help
- This will make the cursor movement faster, but requires more memory
- and it makes the applet a tiny bit larger.
-
-config BUSYBOX_CONFIG_AWK
- bool "awk"
- default BUSYBOX_DEFAULT_AWK
- help
- Awk is used as a pattern scanning and processing language. This is
- the BusyBox implementation of that programming language.
-
-config BUSYBOX_CONFIG_FEATURE_AWK_LIBM
- bool "Enable math functions (requires libm)"
- default BUSYBOX_DEFAULT_FEATURE_AWK_LIBM
- depends on BUSYBOX_CONFIG_AWK
- help
- Enable math functions of the Awk programming language.
- NOTE: This will require libm to be present for linking.
-
-config BUSYBOX_CONFIG_CMP
- bool "cmp"
- default BUSYBOX_DEFAULT_CMP
- help
- cmp is used to compare two files and returns the result
- to standard output.
-
-config BUSYBOX_CONFIG_DIFF
- bool "diff"
- default BUSYBOX_DEFAULT_DIFF
- help
- diff compares two files or directories and outputs the
- differences between them in a form that can be given to
- the patch command.
-
-config BUSYBOX_CONFIG_FEATURE_DIFF_LONG_OPTIONS
- bool "Enable long options"
- default BUSYBOX_DEFAULT_FEATURE_DIFF_LONG_OPTIONS
- depends on BUSYBOX_CONFIG_DIFF && BUSYBOX_CONFIG_LONG_OPTS
- help
- Enable use of long options.
-
-config BUSYBOX_CONFIG_FEATURE_DIFF_DIR
- bool "Enable directory support"
- default BUSYBOX_DEFAULT_FEATURE_DIFF_DIR
- depends on BUSYBOX_CONFIG_DIFF
- help
- This option enables support for directory and subdirectory
- comparison.
-
-config BUSYBOX_CONFIG_ED
- bool "ed"
- default BUSYBOX_DEFAULT_ED
- help
- The original 1970's Unix text editor, from the days of teletypes.
- Small, simple, evil. Part of SUSv3. If you're not already using
- this, you don't need it.
-
-config BUSYBOX_CONFIG_SED
- bool "sed"
- default BUSYBOX_DEFAULT_SED
- help
- sed is used to perform text transformations on a file
- or input from a pipeline.
-
config BUSYBOX_CONFIG_FEATURE_ALLOW_EXEC
bool "Allow vi and awk to execute shell commands"
default BUSYBOX_DEFAULT_FEATURE_ALLOW_EXEC
diff --git a/package/utils/busybox/config/libbb/Config.in b/package/utils/busybox/config/libbb/Config.in
index fbccae5..e66a15b 100644
--- a/package/utils/busybox/config/libbb/Config.in
+++ b/package/utils/busybox/config/libbb/Config.in
@@ -28,9 +28,9 @@ config BUSYBOX_CONFIG_PASSWORD_MINLEN
help
Minimum allowable password length.
-config BUSYBOX_CONFIG_MD5_SIZE_VS_SPEED
+config BUSYBOX_CONFIG_MD5_SMALL
int "MD5: Trade bytes for speed (0:fast, 3:slow)"
- default BUSYBOX_DEFAULT_MD5_SIZE_VS_SPEED
+ default BUSYBOX_DEFAULT_MD5_SMALL
range 0 3
help
Trade binary size versus speed for the md5sum algorithm.
@@ -42,6 +42,16 @@ config BUSYBOX_CONFIG_MD5_SIZE_VS_SPEED
2 3.0 5088
3 (smallest) 5.1 4912
+config BUSYBOX_CONFIG_SHA3_SMALL
+ int "SHA3: Trade bytes for speed (0:fast, 1:slow)"
+ default BUSYBOX_DEFAULT_SHA3_SMALL
+ range 0 1
+ help
+ Trade binary size versus speed for the sha3sum algorithm.
+ SHA3_SMALL=0 compared to SHA3_SMALL=1 (approximate):
+ 64-bit x86: +270 bytes of code, 45% faster
+ 32-bit x86: +450 bytes of code, 75% faster
+
config BUSYBOX_CONFIG_FEATURE_FAST_TOP
bool "Faster /proc scanning code (+100 bytes)"
default BUSYBOX_DEFAULT_FEATURE_FAST_TOP
@@ -108,6 +118,13 @@ config BUSYBOX_CONFIG_FEATURE_EDITING_SAVEHISTORY
help
Enable history saving in shells.
+config BUSYBOX_CONFIG_FEATURE_EDITING_SAVE_ON_EXIT
+ bool "Save history on shell exit, not after every command"
+ default BUSYBOX_DEFAULT_FEATURE_EDITING_SAVE_ON_EXIT
+ depends on BUSYBOX_CONFIG_FEATURE_EDITING_SAVEHISTORY
+ help
+ Save history on shell exit, not after every command.
+
config BUSYBOX_CONFIG_FEATURE_REVERSE_SEARCH
bool "Reverse history search"
default BUSYBOX_DEFAULT_FEATURE_REVERSE_SEARCH
@@ -198,8 +215,8 @@ config BUSYBOX_CONFIG_FEATURE_SKIP_ROOTFS
However, some systems do not mount anything on /.
If you need to configure busybox for one of these systems,
- you may find useful to turn this option off to make df show
- initramfs statistic.
+ you may find it useful to turn this option off to make df show
+ initramfs statistics.
Otherwise, choose Y.
diff --git a/package/utils/busybox/config/loginutils/Config.in b/package/utils/busybox/config/loginutils/Config.in
index 4d77ddb..7fbe6a0 100644
--- a/package/utils/busybox/config/loginutils/Config.in
+++ b/package/utils/busybox/config/loginutils/Config.in
@@ -216,6 +216,17 @@ config BUSYBOX_CONFIG_LOGIN
Note that Busybox binary must be setuid root for this applet to
work properly.
+config BUSYBOX_CONFIG_LOGIN_SESSION_AS_CHILD
+ bool "Run logged in session in a child process"
+ default BUSYBOX_DEFAULT_LOGIN_SESSION_AS_CHILD if BUSYBOX_CONFIG_PAM
+ depends on BUSYBOX_CONFIG_LOGIN
+ help
+ Run the logged in session in a child process. This allows
+ login to clean up things such as utmp entries or PAM sessions
+ when the login session is complete. If you use PAM, you
+ almost always would want this to be set to Y, else PAM session
+ will not be cleaned up.
+
config BUSYBOX_CONFIG_PAM
bool "Support for PAM (Pluggable Authentication Modules)"
default BUSYBOX_DEFAULT_PAM
@@ -283,6 +294,13 @@ config BUSYBOX_CONFIG_CHPASSWD
Reads a file of user name and password pairs from standard input
and uses this information to update a group of existing users.
+config BUSYBOX_CONFIG_FEATURE_DEFAULT_PASSWD_ALGO
+ string "Default password encryption method (passwd -a, cryptpw -m parameter)"
+ default BUSYBOX_DEFAULT_FEATURE_DEFAULT_PASSWD_ALGO
+ depends on BUSYBOX_CONFIG_PASSWD || BUSYBOX_CONFIG_CRYPTPW
+ help
+ Possible choices are "d[es]", "m[d5]", "s[ha256]" or "sha512".
+
config BUSYBOX_CONFIG_SU
bool "su"
default BUSYBOX_DEFAULT_SU
diff --git a/package/utils/busybox/config/mailutils/Config.in b/package/utils/busybox/config/mailutils/Config.in
index 36f7a4a..64b9a2b 100644
--- a/package/utils/busybox/config/mailutils/Config.in
+++ b/package/utils/busybox/config/mailutils/Config.in
@@ -2,7 +2,6 @@
menu "Mail Utilities"
-
config BUSYBOX_CONFIG_MAKEMIME
bool "makemime"
default BUSYBOX_DEFAULT_MAKEMIME
diff --git a/package/utils/busybox/config/miscutils/Config.in b/package/utils/busybox/config/miscutils/Config.in
index b0ddc85..0e0e459 100644
--- a/package/utils/busybox/config/miscutils/Config.in
+++ b/package/utils/busybox/config/miscutils/Config.in
@@ -36,14 +36,11 @@ config BUSYBOX_CONFIG_FEATURE_LESS_BRACKETS
brackets, facilitating programming.
config BUSYBOX_CONFIG_FEATURE_LESS_FLAGS
- bool "Enable extra flags"
+ bool "Enable -m/-M"
default BUSYBOX_DEFAULT_FEATURE_LESS_FLAGS
depends on BUSYBOX_CONFIG_LESS
help
- The extra flags provided do the following:
-
- The -M flag enables a more sophisticated status line.
- The -m flag enables a simpler status line with a percentage.
+ The -M/-m flag enables a more sophisticated status line.
config BUSYBOX_CONFIG_FEATURE_LESS_MARKS
bool "Enable marks"
@@ -106,6 +103,18 @@ config BUSYBOX_CONFIG_NANDDUMP
select BUSYBOX_CONFIG_PLATFORM_LINUX
help
Dump the content of raw NAND chip
+config BUSYBOX_CONFIG_RFKILL
+ bool "rfkill"
+ default BUSYBOX_DEFAULT_RFKILL # doesn't build on Ubuntu 9.04
+ select BUSYBOX_CONFIG_PLATFORM_LINUX
+ help
+ Enable/disable wireless devices.
+
+ rfkill list : list all wireless devices
+ rfkill list bluetooth : list all bluetooth devices
+ rfkill list 1 : list device corresponding to the given index
+ rfkill block|unblock wlan : block/unblock all wlan(wifi) devices
+
config BUSYBOX_CONFIG_SETSERIAL
bool "setserial"
default BUSYBOX_DEFAULT_SETSERIAL
@@ -153,6 +162,12 @@ config BUSYBOX_CONFIG_UBIUPDATEVOL
select BUSYBOX_CONFIG_PLATFORM_LINUX
help
Update a UBI volume.
+config BUSYBOX_CONFIG_WALL
+ bool "wall"
+ default BUSYBOX_DEFAULT_WALL
+ depends on BUSYBOX_CONFIG_FEATURE_UTMP
+ help
+ Write a message to all users that are logged in.
config BUSYBOX_CONFIG_ADJTIMEX
bool "adjtimex"
@@ -656,18 +671,6 @@ config BUSYBOX_CONFIG_READAHEAD
As readahead(2) blocks until each file has been read, it is best to
run this applet as a background job.
-config BUSYBOX_CONFIG_RFKILL
- bool "rfkill"
- default BUSYBOX_DEFAULT_RFKILL # doesn't build on Ubuntu 9.04
- select BUSYBOX_CONFIG_PLATFORM_LINUX
- help
- Enable/disable wireless devices.
-
- rfkill list : list all wireless devices
- rfkill list bluetooth : list all bluetooth devices
- rfkill list 1 : list device corresponding to the given index
- rfkill block|unblock wlan : block/unblock all wlan(wifi) devices
-
config BUSYBOX_CONFIG_RUNLEVEL
bool "runlevel"
default BUSYBOX_DEFAULT_RUNLEVEL
@@ -744,13 +747,6 @@ config BUSYBOX_CONFIG_VOLNAME
help
Prints a CD-ROM volume name.
-config BUSYBOX_CONFIG_WALL
- bool "wall"
- default BUSYBOX_DEFAULT_WALL
- depends on BUSYBOX_CONFIG_FEATURE_UTMP
- help
- Write a message to all users that are logged in.
-
config BUSYBOX_CONFIG_WATCHDOG
bool "watchdog"
default BUSYBOX_DEFAULT_WATCHDOG
diff --git a/package/utils/busybox/config/modutils/Config.in b/package/utils/busybox/config/modutils/Config.in
index cf263a3..9add56e 100644
--- a/package/utils/busybox/config/modutils/Config.in
+++ b/package/utils/busybox/config/modutils/Config.in
@@ -253,7 +253,7 @@ config BUSYBOX_CONFIG_FEATURE_MODUTILS_SYMBOLS
config BUSYBOX_CONFIG_DEFAULT_MODULES_DIR
string "Default directory containing modules"
default BUSYBOX_DEFAULT_DEFAULT_MODULES_DIR
- depends on BUSYBOX_CONFIG_DEPMOD || BUSYBOX_CONFIG_INSMOD || BUSYBOX_CONFIG_MODPROBE || BUSYBOX_CONFIG_MODPROBE_SMALL || BUSYBOX_CONFIG_MODINFO
+ depends on BUSYBOX_CONFIG_DEPMOD || BUSYBOX_CONFIG_MODPROBE || BUSYBOX_CONFIG_MODPROBE_SMALL || BUSYBOX_CONFIG_MODINFO
help
Directory that contains kernel modules.
Defaults to "/lib/modules"
diff --git a/package/utils/busybox/config/networking/Config.in b/package/utils/busybox/config/networking/Config.in
index 26bde15..80dd42a 100644
--- a/package/utils/busybox/config/networking/Config.in
+++ b/package/utils/busybox/config/networking/Config.in
@@ -55,7 +55,7 @@ config BUSYBOX_CONFIG_NC_SERVER
Allow netcat to act as a server.
config BUSYBOX_CONFIG_NC_EXTRA
- bool "Netcat extensions (-eiw and filename)"
+ bool "Netcat extensions (-eiw and -f FILE)"
default BUSYBOX_DEFAULT_NC_EXTRA
depends on BUSYBOX_CONFIG_NC
help
@@ -71,7 +71,7 @@ config BUSYBOX_CONFIG_NC_110_COMPAT
This option makes nc closely follow original nc-1.10.
The code is about 2.5k bigger. It enables
-s ADDR, -n, -u, -v, -o FILE, -z options, but loses
- busybox-specific extensions: -f FILE and -ll.
+ busybox-specific extensions: -f FILE.
config BUSYBOX_CONFIG_PING
bool "ping"
default BUSYBOX_DEFAULT_PING
@@ -292,14 +292,22 @@ config BUSYBOX_CONFIG_FEATURE_HTTPD_BASIC_AUTH
help
Utilizes password settings from /etc/httpd.conf for basic
authentication on a per url basis.
+ Example for httpd.conf file:
+ /adm:toor:PaSsWd
config BUSYBOX_CONFIG_FEATURE_HTTPD_AUTH_MD5
bool "Support MD5 crypted passwords for http Authentication"
default BUSYBOX_DEFAULT_FEATURE_HTTPD_AUTH_MD5
depends on BUSYBOX_CONFIG_FEATURE_HTTPD_BASIC_AUTH
help
- Enables basic per URL authentication from /etc/httpd.conf
- using md5 passwords.
+ Enables encrypted passwords, and wildcard user/passwords
+ in httpd.conf file.
+ User '*' means 'any system user name is ok',
+ password of '*' means 'use system password for this user'
+ Examples:
+ /adm:toor:$1$P/eKnWXS$aI1aPGxT.dJD5SzqAKWrF0
+ /adm:root:*
+ /wiki:*:*
config BUSYBOX_CONFIG_FEATURE_HTTPD_CGI
bool "Support Common Gateway Interface (CGI)"
@@ -316,8 +324,8 @@ config BUSYBOX_CONFIG_FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR
help
This option enables support for running scripts through an
interpreter. Turn this on if you want PHP scripts to work
- properly. You need to supply an additional line in your httpd
- config file:
+ properly. You need to supply an additional line in your
+ httpd.conf file:
*.php:/path/to/your/php
config BUSYBOX_CONFIG_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV
@@ -1036,8 +1044,8 @@ config BUSYBOX_CONFIG_WGET
bool "wget"
default BUSYBOX_DEFAULT_WGET
help
- wget is a utility for non-interactive download of files from HTTP,
- HTTPS, and FTP servers.
+ wget is a utility for non-interactive download of files from HTTP
+ and FTP servers.
config BUSYBOX_CONFIG_FEATURE_WGET_STATUSBAR
bool "Enable a nifty process meter (+2k)"
@@ -1061,16 +1069,18 @@ config BUSYBOX_CONFIG_FEATURE_WGET_LONG_OPTIONS
Support long options for the wget applet.
config BUSYBOX_CONFIG_FEATURE_WGET_TIMEOUT
- bool "Enable read timeout option -T SEC"
+ bool "Enable timeout option -T SEC"
default BUSYBOX_DEFAULT_FEATURE_WGET_TIMEOUT
depends on BUSYBOX_CONFIG_WGET
help
- Supports network read timeout for wget, so that wget will give
- up and timeout when reading network data, through the -T command
- line option. Currently only network data read timeout is
- supported (i.e., timeout is not applied to the DNS nor TCP
- connection initialization). When FEATURE_WGET_LONG_OPTIONS is
- also enabled, the --timeout option will work in addition to -T.
+ Supports network read and connect timeouts for wget,
+ so that wget will give up and timeout, through the -T
+ command line option.
+
+ Currently only connect and network data read timeout are
+ supported (i.e., timeout is not applied to the DNS query). When
+ FEATURE_WGET_LONG_OPTIONS is also enabled, the --timeout option
+ will work in addition to -T.
config BUSYBOX_CONFIG_ZCIP
bool "zcip"
diff --git a/package/utils/busybox/config/networking/udhcp/Config.in b/package/utils/busybox/config/networking/udhcp/Config.in
index 64731f1..576a01a 100644
--- a/package/utils/busybox/config/networking/udhcp/Config.in
+++ b/package/utils/busybox/config/networking/udhcp/Config.in
@@ -4,7 +4,12 @@
# see scripts/kbuild/config-language.txt.
#
-
+config BUSYBOX_CONFIG_UDHCPC6
+ bool "udhcp client for DHCPv6 (udhcpc6)"
+ default BUSYBOX_DEFAULT_UDHCPC6 # not yet ready
+ depends on BUSYBOX_CONFIG_FEATURE_IPV6
+ help
+ udhcpc6 is a DHCPv6 client
config BUSYBOX_CONFIG_UDHCPD
bool "udhcp server (udhcpd)"
diff --git a/package/utils/busybox/config/printutils/Config.in b/package/utils/busybox/config/printutils/Config.in
index d22e4e9..cccc4a5 100644
--- a/package/utils/busybox/config/printutils/Config.in
+++ b/package/utils/busybox/config/printutils/Config.in
@@ -7,7 +7,6 @@
menu "Print Utilities"
-
config BUSYBOX_CONFIG_LPD
bool "lpd"
default BUSYBOX_DEFAULT_LPD
diff --git a/package/utils/busybox/config/procps/Config.in b/package/utils/busybox/config/procps/Config.in
index e9c68d9..6eafbda 100644
--- a/package/utils/busybox/config/procps/Config.in
+++ b/package/utils/busybox/config/procps/Config.in
@@ -11,6 +11,12 @@ config BUSYBOX_CONFIG_IOSTAT
default BUSYBOX_DEFAULT_IOSTAT
help
Report CPU and I/O statistics
+config BUSYBOX_CONFIG_LSOF
+ bool "lsof"
+ default BUSYBOX_DEFAULT_LSOF
+ help
+ Show open files in the format of:
+ PID <TAB> /path/to/executable <TAB> /path/to/opened/file
config BUSYBOX_CONFIG_MPSTAT
bool "mpstat"
default BUSYBOX_DEFAULT_MPSTAT
@@ -47,6 +53,59 @@ config BUSYBOX_CONFIG_SMEMCAP
help
smemcap is a tool for capturing process data for smem,
a memory usage statistic tool.
+config BUSYBOX_CONFIG_TOP
+ bool "top"
+ default BUSYBOX_DEFAULT_TOP
+ help
+ The top program provides a dynamic real-time view of a running
+ system.
+
+config BUSYBOX_CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE
+ bool "Show CPU per-process usage percentage"
+ default BUSYBOX_DEFAULT_FEATURE_TOP_CPU_USAGE_PERCENTAGE
+ depends on BUSYBOX_CONFIG_TOP
+ help
+ Make top display CPU usage for each process.
+ This adds about 2k.
+
+config BUSYBOX_CONFIG_FEATURE_TOP_CPU_GLOBAL_PERCENTS
+ bool "Show CPU global usage percentage"
+ default BUSYBOX_DEFAULT_FEATURE_TOP_CPU_GLOBAL_PERCENTS
+ depends on BUSYBOX_CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE
+ help
+ Makes top display "CPU: NN% usr NN% sys..." line.
+ This adds about 0.5k.
+
+config BUSYBOX_CONFIG_FEATURE_TOP_SMP_CPU
+ bool "SMP CPU usage display ('c' key)"
+ default BUSYBOX_DEFAULT_FEATURE_TOP_SMP_CPU
+ depends on BUSYBOX_CONFIG_FEATURE_TOP_CPU_GLOBAL_PERCENTS
+ help
+ Allow 'c' key to switch between individual/cumulative CPU stats
+ This adds about 0.5k.
+
+config BUSYBOX_CONFIG_FEATURE_TOP_DECIMALS
+ bool "Show 1/10th of a percent in CPU/mem statistics"
+ default BUSYBOX_DEFAULT_FEATURE_TOP_DECIMALS
+ depends on BUSYBOX_CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE
+ help
+ Show 1/10th of a percent in CPU/mem statistics.
+ This adds about 0.3k.
+
+config BUSYBOX_CONFIG_FEATURE_TOP_SMP_PROCESS
+ bool "Show CPU process runs on ('j' field)"
+ default BUSYBOX_DEFAULT_FEATURE_TOP_SMP_PROCESS
+ depends on BUSYBOX_CONFIG_TOP
+ help
+ Show CPU where process was last found running on.
+ This is the 'j' field.
+
+config BUSYBOX_CONFIG_FEATURE_TOPMEM
+ bool "Topmem command ('s' key)"
+ default BUSYBOX_DEFAULT_FEATURE_TOPMEM
+ depends on BUSYBOX_CONFIG_TOP
+ help
+ Enable 's' in top (gives lots of memory info).
config BUSYBOX_CONFIG_UPTIME
bool "uptime"
default BUSYBOX_DEFAULT_UPTIME
@@ -146,12 +205,20 @@ config BUSYBOX_CONFIG_PS
config BUSYBOX_CONFIG_FEATURE_PS_WIDE
bool "Enable wide output option (-w)"
default BUSYBOX_DEFAULT_FEATURE_PS_WIDE
- depends on BUSYBOX_CONFIG_PS
+ depends on BUSYBOX_CONFIG_PS && !BUSYBOX_CONFIG_DESKTOP
help
Support argument 'w' for wide output.
If given once, 132 chars are printed, and if given more
than once, the length is unlimited.
+config BUSYBOX_CONFIG_FEATURE_PS_LONG
+ bool "Enable long output option (-l)"
+ default BUSYBOX_DEFAULT_FEATURE_PS_LONG
+ depends on BUSYBOX_CONFIG_PS && !BUSYBOX_CONFIG_DESKTOP
+ help
+ Support argument 'l' for long output.
+ Adds fields PPID, RSS, START, TIME & TTY
+
config BUSYBOX_CONFIG_FEATURE_PS_TIME
bool "Enable time and elapsed time output"
default BUSYBOX_DEFAULT_FEATURE_PS_TIME
@@ -188,60 +255,6 @@ config BUSYBOX_CONFIG_BB_SYSCTL
help
Configure kernel parameters at runtime.
-config BUSYBOX_CONFIG_TOP
- bool "top"
- default BUSYBOX_DEFAULT_TOP
- help
- The top program provides a dynamic real-time view of a running
- system.
-
-config BUSYBOX_CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE
- bool "Show CPU per-process usage percentage"
- default BUSYBOX_DEFAULT_FEATURE_TOP_CPU_USAGE_PERCENTAGE
- depends on BUSYBOX_CONFIG_TOP
- help
- Make top display CPU usage for each process.
- This adds about 2k.
-
-config BUSYBOX_CONFIG_FEATURE_TOP_CPU_GLOBAL_PERCENTS
- bool "Show CPU global usage percentage"
- default BUSYBOX_DEFAULT_FEATURE_TOP_CPU_GLOBAL_PERCENTS
- depends on BUSYBOX_CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE
- help
- Makes top display "CPU: NN% usr NN% sys..." line.
- This adds about 0.5k.
-
-config BUSYBOX_CONFIG_FEATURE_TOP_SMP_CPU
- bool "SMP CPU usage display ('c' key)"
- default BUSYBOX_DEFAULT_FEATURE_TOP_SMP_CPU
- depends on BUSYBOX_CONFIG_FEATURE_TOP_CPU_GLOBAL_PERCENTS
- help
- Allow 'c' key to switch between individual/cumulative CPU stats
- This adds about 0.5k.
-
-config BUSYBOX_CONFIG_FEATURE_TOP_DECIMALS
- bool "Show 1/10th of a percent in CPU/mem statistics"
- default BUSYBOX_DEFAULT_FEATURE_TOP_DECIMALS
- depends on BUSYBOX_CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE
- help
- Show 1/10th of a percent in CPU/mem statistics.
- This adds about 0.3k.
-
-config BUSYBOX_CONFIG_FEATURE_TOP_SMP_PROCESS
- bool "Show CPU process runs on ('j' field)"
- default BUSYBOX_DEFAULT_FEATURE_TOP_SMP_PROCESS
- depends on BUSYBOX_CONFIG_TOP
- help
- Show CPU where process was last found running on.
- This is the 'j' field.
-
-config BUSYBOX_CONFIG_FEATURE_TOPMEM
- bool "Topmem command ('s' key)"
- default BUSYBOX_DEFAULT_FEATURE_TOPMEM
- depends on BUSYBOX_CONFIG_TOP
- help
- Enable 's' in top (gives lots of memory info).
-
config BUSYBOX_CONFIG_FEATURE_SHOW_THREADS
bool "Support for showing threads in ps/pstree/top"
default BUSYBOX_DEFAULT_FEATURE_SHOW_THREADS
diff --git a/package/utils/busybox/config/runit/Config.in b/package/utils/busybox/config/runit/Config.in
index 8d0e07b..8074fb1 100644
--- a/package/utils/busybox/config/runit/Config.in
+++ b/package/utils/busybox/config/runit/Config.in
@@ -7,7 +7,6 @@
menu "Runit Utilities"
-
config BUSYBOX_CONFIG_RUNSV
bool "runsv"
default BUSYBOX_DEFAULT_RUNSV
diff --git a/package/utils/busybox/config/selinux/Config.in b/package/utils/busybox/config/selinux/Config.in
index 7597bb5..3340e4b 100644
--- a/package/utils/busybox/config/selinux/Config.in
+++ b/package/utils/busybox/config/selinux/Config.in
@@ -8,7 +8,6 @@ menu "SELinux Utilities"
depends on BUSYBOX_CONFIG_SELINUX
-
config BUSYBOX_CONFIG_CHCON
bool "chcon"
default BUSYBOX_DEFAULT_CHCON
diff --git a/package/utils/busybox/config/shell/Config.in b/package/utils/busybox/config/shell/Config.in
index 594675a..c375f0c 100644
--- a/package/utils/busybox/config/shell/Config.in
+++ b/package/utils/busybox/config/shell/Config.in
@@ -156,6 +156,9 @@ config BUSYBOX_CONFIG_CTTYHACK
# exec setsid sh -c 'exec sh </dev/tty1 >/dev/tty1 2>&1'
+ Starting getty on a controlling tty from a shell script:
+
+ # getty 115200 $(cttyhack)
config BUSYBOX_CONFIG_HUSH
bool "hush"
default BUSYBOX_DEFAULT_HUSH
@@ -292,6 +295,7 @@ config BUSYBOX_CONFIG_MSH
msh is deprecated and will be removed, please migrate to hush.
+
choice
prompt "Choose which shell is aliased to 'sh' name"
default BUSYBOX_CONFIG_FEATURE_SH_IS_ASH
diff --git a/package/utils/busybox/config/sysklogd/Config.in b/package/utils/busybox/config/sysklogd/Config.in
index fe08eb2..de36a1e 100644
--- a/package/utils/busybox/config/sysklogd/Config.in
+++ b/package/utils/busybox/config/sysklogd/Config.in
@@ -7,7 +7,6 @@
menu "System Logging Utilities"
-
config BUSYBOX_CONFIG_SYSLOGD
bool "syslogd"
default BUSYBOX_DEFAULT_SYSLOGD
@@ -114,6 +113,19 @@ config BUSYBOX_CONFIG_FEATURE_LOGREAD_REDUCED_LOCKING
from circular buffer, minimizing semaphore
contention at some minor memory expense.
+config BUSYBOX_CONFIG_FEATURE_KMSG_SYSLOG
+ bool "Linux kernel printk buffer support"
+ default BUSYBOX_DEFAULT_FEATURE_KMSG_SYSLOG
+ depends on BUSYBOX_CONFIG_SYSLOGD
+ select BUSYBOX_CONFIG_PLATFORM_LINUX
+ help
+ When you enable this feature, the syslogd utility will
+ write system log message to the Linux kernel's printk buffer.
+ This can be used as a smaller alternative to the syslogd IPC
+ support, as klogd and logread aren't needed.
+
+ NOTICE: Syslog facilities in log entries needs kernel 3.5+.
+
config BUSYBOX_CONFIG_KLOGD
bool "klogd"
default BUSYBOX_DEFAULT_KLOGD
@@ -124,6 +136,9 @@ config BUSYBOX_CONFIG_KLOGD
you wish to record the messages produced by the kernel,
you should enable this option.
+comment "klogd should not be used together with syslog to kernel printk buffer"
+ depends on BUSYBOX_CONFIG_KLOGD && BUSYBOX_CONFIG_FEATURE_KMSG_SYSLOG
+
config BUSYBOX_CONFIG_FEATURE_KLOGD_KLOGCTL
bool "Use the klogctl() interface"
default BUSYBOX_DEFAULT_FEATURE_KLOGD_KLOGCTL
diff --git a/package/utils/busybox/config/util-linux/Config.in b/package/utils/busybox/config/util-linux/Config.in
index 66751db..f78234d 100644
--- a/package/utils/busybox/config/util-linux/Config.in
+++ b/package/utils/busybox/config/util-linux/Config.in
@@ -11,6 +11,69 @@ config BUSYBOX_CONFIG_BLOCKDEV
default BUSYBOX_DEFAULT_BLOCKDEV
help
Performs some ioctls with block devices.
+config BUSYBOX_CONFIG_FSTRIM
+ bool "fstrim"
+ default BUSYBOX_DEFAULT_FSTRIM
+ select BUSYBOX_CONFIG_PLATFORM_LINUX
+ help
+ Discard unused blocks on a mounted filesystem.
+config BUSYBOX_CONFIG_MDEV
+ bool "mdev"
+ default BUSYBOX_DEFAULT_MDEV
+ select BUSYBOX_CONFIG_PLATFORM_LINUX
+ help
+ mdev is a mini-udev implementation for dynamically creating device
+ nodes in the /dev directory.
+
+ For more information, please see docs/mdev.txt
+
+config BUSYBOX_CONFIG_FEATURE_MDEV_CONF
+ bool "Support /etc/mdev.conf"
+ default BUSYBOX_DEFAULT_FEATURE_MDEV_CONF
+ depends on BUSYBOX_CONFIG_MDEV
+ help
+ Add support for the mdev config file to control ownership and
+ permissions of the device nodes.
+
+ For more information, please see docs/mdev.txt
+
+config BUSYBOX_CONFIG_FEATURE_MDEV_RENAME
+ bool "Support subdirs/symlinks"
+ default BUSYBOX_DEFAULT_FEATURE_MDEV_RENAME
+ depends on BUSYBOX_CONFIG_FEATURE_MDEV_CONF
+ help
+ Add support for renaming devices and creating symlinks.
+
+ For more information, please see docs/mdev.txt
+
+config BUSYBOX_CONFIG_FEATURE_MDEV_RENAME_REGEXP
+ bool "Support regular expressions substitutions when renaming device"
+ default BUSYBOX_DEFAULT_FEATURE_MDEV_RENAME_REGEXP
+ depends on BUSYBOX_CONFIG_FEATURE_MDEV_RENAME
+ help
+ Add support for regular expressions substitutions when renaming
+ device.
+
+config BUSYBOX_CONFIG_FEATURE_MDEV_EXEC
+ bool "Support command execution at device addition/removal"
+ default BUSYBOX_DEFAULT_FEATURE_MDEV_EXEC
+ depends on BUSYBOX_CONFIG_FEATURE_MDEV_CONF
+ help
+ This adds support for an optional field to /etc/mdev.conf for
+ executing commands when devices are created/removed.
+
+ For more information, please see docs/mdev.txt
+
+config BUSYBOX_CONFIG_FEATURE_MDEV_LOAD_FIRMWARE
+ bool "Support loading of firmwares"
+ default BUSYBOX_DEFAULT_FEATURE_MDEV_LOAD_FIRMWARE
+ depends on BUSYBOX_CONFIG_MDEV
+ help
+ Some devices need to load firmware before they can be usable.
+
+ These devices will request userspace look up the files in
+ /lib/firmware/ and if it exists, send it to the kernel for
+ loading into the hardware.
config BUSYBOX_CONFIG_REV
bool "rev"
default BUSYBOX_DEFAULT_REV
@@ -414,64 +477,6 @@ config BUSYBOX_CONFIG_LSUSB
This version uses sysfs (/sys/bus/usb/devices) only.
-config BUSYBOX_CONFIG_MDEV
- bool "mdev"
- default BUSYBOX_DEFAULT_MDEV
- select BUSYBOX_CONFIG_PLATFORM_LINUX
- help
- mdev is a mini-udev implementation for dynamically creating device
- nodes in the /dev directory.
-
- For more information, please see docs/mdev.txt
-
-config BUSYBOX_CONFIG_FEATURE_MDEV_CONF
- bool "Support /etc/mdev.conf"
- default BUSYBOX_DEFAULT_FEATURE_MDEV_CONF
- depends on BUSYBOX_CONFIG_MDEV
- help
- Add support for the mdev config file to control ownership and
- permissions of the device nodes.
-
- For more information, please see docs/mdev.txt
-
-config BUSYBOX_CONFIG_FEATURE_MDEV_RENAME
- bool "Support subdirs/symlinks"
- default BUSYBOX_DEFAULT_FEATURE_MDEV_RENAME
- depends on BUSYBOX_CONFIG_FEATURE_MDEV_CONF
- help
- Add support for renaming devices and creating symlinks.
-
- For more information, please see docs/mdev.txt
-
-config BUSYBOX_CONFIG_FEATURE_MDEV_RENAME_REGEXP
- bool "Support regular expressions substitutions when renaming device"
- default BUSYBOX_DEFAULT_FEATURE_MDEV_RENAME_REGEXP
- depends on BUSYBOX_CONFIG_FEATURE_MDEV_RENAME
- help
- Add support for regular expressions substitutions when renaming
- device.
-
-config BUSYBOX_CONFIG_FEATURE_MDEV_EXEC
- bool "Support command execution at device addition/removal"
- default BUSYBOX_DEFAULT_FEATURE_MDEV_EXEC
- depends on BUSYBOX_CONFIG_FEATURE_MDEV_CONF
- help
- This adds support for an optional field to /etc/mdev.conf for
- executing commands when devices are created/removed.
-
- For more information, please see docs/mdev.txt
-
-config BUSYBOX_CONFIG_FEATURE_MDEV_LOAD_FIRMWARE
- bool "Support loading of firmwares"
- default BUSYBOX_DEFAULT_FEATURE_MDEV_LOAD_FIRMWARE
- depends on BUSYBOX_CONFIG_MDEV
- help
- Some devices need to load firmware before they can be usable.
-
- These devices will request userspace look up the files in
- /lib/firmware/ and if it exists, send it to the kernel for
- loading into the hardware.
-
config BUSYBOX_CONFIG_MKSWAP
bool "mkswap"
default BUSYBOX_DEFAULT_MKSWAP
@@ -553,13 +558,18 @@ config BUSYBOX_CONFIG_FEATURE_MOUNT_LABEL
This also enables label or uuid support for swapon.
config BUSYBOX_CONFIG_FEATURE_MOUNT_NFS
- bool "Support mounting NFS file systems"
+ bool "Support mounting NFS file systems on Linux < 2.6.23"
default BUSYBOX_DEFAULT_FEATURE_MOUNT_NFS
depends on BUSYBOX_CONFIG_MOUNT
select BUSYBOX_CONFIG_FEATURE_HAVE_RPC
select BUSYBOX_CONFIG_FEATURE_SYSLOG
help
- Enable mounting of NFS file systems.
+ Enable mounting of NFS file systems on Linux kernels prior
+ to version 2.6.23. Note that in this case mounting of NFS
+ over IPv6 will not be possible.
+
+ Note that this option links in RPC support from libc,
+ which is rather large (~10 kbytes on uclibc).
config BUSYBOX_CONFIG_FEATURE_MOUNT_CIFS
bool "Support mounting CIFS/SMB file systems"
@@ -762,224 +772,6 @@ config BUSYBOX_CONFIG_FEATURE_MTAB_SUPPORT
About the only reason to use this is if you've removed /proc from
your kernel.
-config BUSYBOX_CONFIG_VOLUMEID
- bool #No description makes it a hidden option
- default BUSYBOX_DEFAULT_VOLUMEID
-
-menu "Filesystem/Volume identification"
- depends on BUSYBOX_CONFIG_VOLUMEID
-
-config BUSYBOX_CONFIG_FEATURE_VOLUMEID_EXT
- bool "Ext filesystem"
- default BUSYBOX_DEFAULT_FEATURE_VOLUMEID_EXT
- depends on BUSYBOX_CONFIG_VOLUMEID
- help
- TODO
-
-config BUSYBOX_CONFIG_FEATURE_VOLUMEID_BTRFS
- bool "btrfs filesystem"
- default BUSYBOX_DEFAULT_FEATURE_VOLUMEID_BTRFS
- depends on BUSYBOX_CONFIG_VOLUMEID
- help
- TODO
-
-config BUSYBOX_CONFIG_FEATURE_VOLUMEID_REISERFS
- bool "Reiser filesystem"
- default BUSYBOX_DEFAULT_FEATURE_VOLUMEID_REISERFS
- depends on BUSYBOX_CONFIG_VOLUMEID
- help
- TODO
-
-config BUSYBOX_CONFIG_FEATURE_VOLUMEID_FAT
- bool "fat filesystem"
- default BUSYBOX_DEFAULT_FEATURE_VOLUMEID_FAT
- depends on BUSYBOX_CONFIG_VOLUMEID
- help
- TODO
-
-config BUSYBOX_CONFIG_FEATURE_VOLUMEID_HFS
- bool "hfs filesystem"
- default BUSYBOX_DEFAULT_FEATURE_VOLUMEID_HFS
- depends on BUSYBOX_CONFIG_VOLUMEID
- help
- TODO
-
-config BUSYBOX_CONFIG_FEATURE_VOLUMEID_JFS
- bool "jfs filesystem"
- default BUSYBOX_DEFAULT_FEATURE_VOLUMEID_JFS
- depends on BUSYBOX_CONFIG_VOLUMEID
- help
- TODO
-
-### config FEATURE_VOLUMEID_UFS
-### bool "ufs filesystem"
-### default y
-### depends on VOLUMEID
-### help
-### TODO
-
-config BUSYBOX_CONFIG_FEATURE_VOLUMEID_XFS
- bool "xfs filesystem"
- default BUSYBOX_DEFAULT_FEATURE_VOLUMEID_XFS
- depends on BUSYBOX_CONFIG_VOLUMEID
- help
- TODO
-
-config BUSYBOX_CONFIG_FEATURE_VOLUMEID_NTFS
- bool "ntfs filesystem"
- default BUSYBOX_DEFAULT_FEATURE_VOLUMEID_NTFS
- depends on BUSYBOX_CONFIG_VOLUMEID
- help
- TODO
-
-config BUSYBOX_CONFIG_FEATURE_VOLUMEID_ISO9660
- bool "iso9660 filesystem"
- default BUSYBOX_DEFAULT_FEATURE_VOLUMEID_ISO9660
- depends on BUSYBOX_CONFIG_VOLUMEID
- help
- TODO
-
-config BUSYBOX_CONFIG_FEATURE_VOLUMEID_UDF
- bool "udf filesystem"
- default BUSYBOX_DEFAULT_FEATURE_VOLUMEID_UDF
- depends on BUSYBOX_CONFIG_VOLUMEID
- help
- TODO
-
-config BUSYBOX_CONFIG_FEATURE_VOLUMEID_LUKS
- bool "luks filesystem"
- default BUSYBOX_DEFAULT_FEATURE_VOLUMEID_LUKS
- depends on BUSYBOX_CONFIG_VOLUMEID
- help
- TODO
-
-config BUSYBOX_CONFIG_FEATURE_VOLUMEID_LINUXSWAP
- bool "linux swap filesystem"
- default BUSYBOX_DEFAULT_FEATURE_VOLUMEID_LINUXSWAP
- depends on BUSYBOX_CONFIG_VOLUMEID
- help
- TODO
-
-### config FEATURE_VOLUMEID_LVM
-### bool "lvm"
-### default y
-### depends on VOLUMEID
-### help
-### TODO
-
-config BUSYBOX_CONFIG_FEATURE_VOLUMEID_CRAMFS
- bool "cramfs filesystem"
- default BUSYBOX_DEFAULT_FEATURE_VOLUMEID_CRAMFS
- depends on BUSYBOX_CONFIG_VOLUMEID
- help
- TODO
-
-### config FEATURE_VOLUMEID_HPFS
-### bool "hpfs filesystem"
-### default y
-### depends on VOLUMEID
-### help
-### TODO
-
-config BUSYBOX_CONFIG_FEATURE_VOLUMEID_ROMFS
- bool "romfs filesystem"
- default BUSYBOX_DEFAULT_FEATURE_VOLUMEID_ROMFS
- depends on BUSYBOX_CONFIG_VOLUMEID
- help
- TODO
-
-config BUSYBOX_CONFIG_FEATURE_VOLUMEID_SYSV
- bool "sysv filesystem"
- default BUSYBOX_DEFAULT_FEATURE_VOLUMEID_SYSV
- depends on BUSYBOX_CONFIG_VOLUMEID
- help
- TODO
-
-### config FEATURE_VOLUMEID_MINIX
-### bool "minix filesystem"
-### default y
-### depends on VOLUMEID
-### help
-### TODO
-
-### These only detect partition tables - not used (yet?)
-### config FEATURE_VOLUMEID_MAC
-### bool "mac filesystem"
-### default y
-### depends on VOLUMEID
-### help
-### TODO
-###
-### config FEATURE_VOLUMEID_MSDOS
-### bool "msdos filesystem"
-### default y
-### depends on VOLUMEID
-### help
-### TODO
-
-config BUSYBOX_CONFIG_FEATURE_VOLUMEID_OCFS2
- bool "ocfs2 filesystem"
- default BUSYBOX_DEFAULT_FEATURE_VOLUMEID_OCFS2
- depends on BUSYBOX_CONFIG_VOLUMEID
- help
- TODO
-
-### config FEATURE_VOLUMEID_HIGHPOINTRAID
-### bool "highpoint raid"
-### default y
-### depends on VOLUMEID
-### help
-### TODO
-
-### config FEATURE_VOLUMEID_ISWRAID
-### bool "intel raid"
-### default y
-### depends on VOLUMEID
-### help
-### TODO
-
-### config FEATURE_VOLUMEID_LSIRAID
-### bool "lsi raid"
-### default y
-### depends on VOLUMEID
-### help
-### TODO
-
-### config FEATURE_VOLUMEID_VIARAID
-### bool "via raid"
-### default y
-### depends on VOLUMEID
-### help
-### TODO
-
-### config FEATURE_VOLUMEID_SILICONRAID
-### bool "silicon raid"
-### default y
-### depends on VOLUMEID
-### help
-### TODO
-
-### config FEATURE_VOLUMEID_NVIDIARAID
-### bool "nvidia raid"
-### default y
-### depends on VOLUMEID
-### help
-### TODO
-
-### config FEATURE_VOLUMEID_PROMISERAID
-### bool "promise raid"
-### default y
-### depends on VOLUMEID
-### help
-### TODO
-
-config BUSYBOX_CONFIG_FEATURE_VOLUMEID_LINUXRAID
- bool "linuxraid"
- default BUSYBOX_DEFAULT_FEATURE_VOLUMEID_LINUXRAID
- depends on BUSYBOX_CONFIG_VOLUMEID
- help
- TODO
-
-endmenu
+source package/utils/busybox/config/util-linux/volume_id/Config.in
endmenu
diff --git a/package/utils/busybox/config/util-linux/volume_id/Config.in b/package/utils/busybox/config/util-linux/volume_id/Config.in
new file mode 100644
index 0000000..306550b
--- /dev/null
+++ b/package/utils/busybox/config/util-linux/volume_id/Config.in
@@ -0,0 +1,304 @@
+# DO NOT EDIT. This file is generated from Config.src
+#
+# For a description of the syntax of this configuration file,
+# see scripts/kbuild/config-language.txt.
+#
+
+config BUSYBOX_CONFIG_VOLUMEID
+ bool #No description makes it a hidden option
+ default BUSYBOX_DEFAULT_VOLUMEID
+
+menu "Filesystem/Volume identification"
+ depends on BUSYBOX_CONFIG_VOLUMEID
+
+
+config BUSYBOX_CONFIG_FEATURE_VOLUMEID_BTRFS
+ bool "btrfs filesystem"
+ default BUSYBOX_DEFAULT_FEATURE_VOLUMEID_BTRFS
+ depends on BUSYBOX_CONFIG_VOLUMEID
+ help
+ TODO
+
+
+config BUSYBOX_CONFIG_FEATURE_VOLUMEID_CRAMFS
+ bool "cramfs filesystem"
+ default BUSYBOX_DEFAULT_FEATURE_VOLUMEID_CRAMFS
+ depends on BUSYBOX_CONFIG_VOLUMEID
+ help
+ TODO
+
+
+config BUSYBOX_CONFIG_FEATURE_VOLUMEID_EXFAT
+ bool "exFAT filesystem"
+ default BUSYBOX_DEFAULT_FEATURE_VOLUMEID_EXFAT
+ depends on BUSYBOX_CONFIG_VOLUMEID
+ help
+ exFAT (extended FAT) is a proprietary file system designed especially
+ for flash drives. It has many features from NTFS, but with less
+ overhead. exFAT is used on most SDXC cards for consumer electronics.
+
+
+config BUSYBOX_CONFIG_FEATURE_VOLUMEID_EXT
+ bool "Ext filesystem"
+ default BUSYBOX_DEFAULT_FEATURE_VOLUMEID_EXT
+ depends on BUSYBOX_CONFIG_VOLUMEID
+ help
+ TODO
+
+
+config BUSYBOX_CONFIG_FEATURE_VOLUMEID_F2FS
+ bool "f2fs filesystem"
+ default BUSYBOX_DEFAULT_FEATURE_VOLUMEID_F2FS
+ depends on BUSYBOX_CONFIG_VOLUMEID
+ help
+ F2FS (aka Flash-Friendly File System) is a log-structured file system,
+ which is adapted to newer forms of storage. F2FS also remedies some
+ known issues of the older log structured file systems, such as high
+ cleaning overhead.
+
+
+config BUSYBOX_CONFIG_FEATURE_VOLUMEID_FAT
+ bool "fat filesystem"
+ default BUSYBOX_DEFAULT_FEATURE_VOLUMEID_FAT
+ depends on BUSYBOX_CONFIG_VOLUMEID
+ help
+ TODO
+
+
+config BUSYBOX_CONFIG_FEATURE_VOLUMEID_HFS
+ bool "hfs filesystem"
+ default BUSYBOX_DEFAULT_FEATURE_VOLUMEID_HFS
+ depends on BUSYBOX_CONFIG_VOLUMEID
+ help
+ TODO
+
+
+config BUSYBOX_CONFIG_FEATURE_VOLUMEID_ISO9660
+ bool "iso9660 filesystem"
+ default BUSYBOX_DEFAULT_FEATURE_VOLUMEID_ISO9660
+ depends on BUSYBOX_CONFIG_VOLUMEID
+ help
+ TODO
+
+
+config BUSYBOX_CONFIG_FEATURE_VOLUMEID_JFS
+ bool "jfs filesystem"
+ default BUSYBOX_DEFAULT_FEATURE_VOLUMEID_JFS
+ depends on BUSYBOX_CONFIG_VOLUMEID
+ help
+ TODO
+
+
+config BUSYBOX_CONFIG_FEATURE_VOLUMEID_LINUXRAID
+ bool "linuxraid"
+ default BUSYBOX_DEFAULT_FEATURE_VOLUMEID_LINUXRAID
+ depends on BUSYBOX_CONFIG_VOLUMEID
+ help
+ TODO
+
+
+config BUSYBOX_CONFIG_FEATURE_VOLUMEID_LINUXSWAP
+ bool "linux swap filesystem"
+ default BUSYBOX_DEFAULT_FEATURE_VOLUMEID_LINUXSWAP
+ depends on BUSYBOX_CONFIG_VOLUMEID
+ help
+ TODO
+
+
+config BUSYBOX_CONFIG_FEATURE_VOLUMEID_LUKS
+ bool "luks filesystem"
+ default BUSYBOX_DEFAULT_FEATURE_VOLUMEID_LUKS
+ depends on BUSYBOX_CONFIG_VOLUMEID
+ help
+ TODO
+
+
+config BUSYBOX_CONFIG_FEATURE_VOLUMEID_NILFS
+ bool "nilfs filesystem"
+ default BUSYBOX_DEFAULT_FEATURE_VOLUMEID_NILFS
+ depends on BUSYBOX_CONFIG_VOLUMEID
+ help
+ NILFS is a New Implementation of a Log-Structured File System (LFS)
+ that supports continuous snapshots. This provides features like
+ versioning of the entire filesystem, restoration of files that
+ were deleted a few minutes ago. NILFS keeps consistency like
+ conventional LFS, so it provides quick recovery after system crashes.
+
+ The possible use of NILFS includes versioning, tamper detection,
+ SOX compliance logging, and so forth. It can serve as an alternative
+ filesystem for Linux desktop environment, or as a basis of advanced
+ storage appliances.
+
+
+config BUSYBOX_CONFIG_FEATURE_VOLUMEID_NTFS
+ bool "ntfs filesystem"
+ default BUSYBOX_DEFAULT_FEATURE_VOLUMEID_NTFS
+ depends on BUSYBOX_CONFIG_VOLUMEID
+ help
+ TODO
+
+
+config BUSYBOX_CONFIG_FEATURE_VOLUMEID_OCFS2
+ bool "ocfs2 filesystem"
+ default BUSYBOX_DEFAULT_FEATURE_VOLUMEID_OCFS2
+ depends on BUSYBOX_CONFIG_VOLUMEID
+ help
+ TODO
+
+
+config BUSYBOX_CONFIG_FEATURE_VOLUMEID_REISERFS
+ bool "Reiser filesystem"
+ default BUSYBOX_DEFAULT_FEATURE_VOLUMEID_REISERFS
+ depends on BUSYBOX_CONFIG_VOLUMEID
+ help
+ TODO
+
+
+config BUSYBOX_CONFIG_FEATURE_VOLUMEID_ROMFS
+ bool "romfs filesystem"
+ default BUSYBOX_DEFAULT_FEATURE_VOLUMEID_ROMFS
+ depends on BUSYBOX_CONFIG_VOLUMEID
+ help
+ TODO
+
+
+config BUSYBOX_CONFIG_FEATURE_VOLUMEID_SQUASHFS
+ bool "SquashFS filesystem"
+ default BUSYBOX_DEFAULT_FEATURE_VOLUMEID_SQUASHFS
+ depends on BUSYBOX_CONFIG_VOLUMEID && BUSYBOX_CONFIG_FEATURE_BLKID_TYPE
+ help
+ Squashfs is a compressed read-only filesystem for Linux. Squashfs is
+ intended for general read-only filesystem use and in constrained block
+ device/memory systems (e.g. embedded systems) where low overhead is
+ needed.
+
+
+config BUSYBOX_CONFIG_FEATURE_VOLUMEID_SYSV
+ bool "sysv filesystem"
+ default BUSYBOX_DEFAULT_FEATURE_VOLUMEID_SYSV
+ depends on BUSYBOX_CONFIG_VOLUMEID
+ help
+ TODO
+
+
+config BUSYBOX_CONFIG_FEATURE_VOLUMEID_UDF
+ bool "udf filesystem"
+ default BUSYBOX_DEFAULT_FEATURE_VOLUMEID_UDF
+ depends on BUSYBOX_CONFIG_VOLUMEID
+ help
+ TODO
+
+
+### config FEATURE_VOLUMEID_HIGHPOINTRAID
+### bool "highpoint raid"
+### default y
+### depends on VOLUMEID
+### help
+### TODO
+
+
+### config FEATURE_VOLUMEID_HPFS
+### bool "hpfs filesystem"
+### default y
+### depends on VOLUMEID
+### help
+### TODO
+
+
+### config FEATURE_VOLUMEID_ISWRAID
+### bool "intel raid"
+### default y
+### depends on VOLUMEID
+### help
+### TODO
+
+
+### config FEATURE_VOLUMEID_LSIRAID
+### bool "lsi raid"
+### default y
+### depends on VOLUMEID
+### help
+### TODO
+
+
+### config FEATURE_VOLUMEID_LVM
+### bool "lvm"
+### default y
+### depends on VOLUMEID
+### help
+### TODO
+
+
+### config FEATURE_VOLUMEID_MAC
+### bool "mac filesystem"
+### default y
+### depends on VOLUMEID
+### help
+### TODO
+
+
+### config FEATURE_VOLUMEID_MINIX
+### bool "minix filesystem"
+### default y
+### depends on VOLUMEID
+### help
+### TODO
+
+
+### config FEATURE_VOLUMEID_MSDOS
+### bool "msdos filesystem"
+### default y
+### depends on VOLUMEID
+### help
+### TODO
+
+
+### config FEATURE_VOLUMEID_NVIDIARAID
+### bool "nvidia raid"
+### default y
+### depends on VOLUMEID
+### help
+### TODO
+
+
+### config FEATURE_VOLUMEID_PROMISERAID
+### bool "promise raid"
+### default y
+### depends on VOLUMEID
+### help
+### TODO
+
+
+### config FEATURE_VOLUMEID_SILICONRAID
+### bool "silicon raid"
+### default y
+### depends on VOLUMEID
+### help
+### TODO
+
+
+### config FEATURE_VOLUMEID_UFS
+### bool "ufs filesystem"
+### default y
+### depends on VOLUMEID
+### help
+### TODO
+
+
+### config FEATURE_VOLUMEID_VIARAID
+### bool "via raid"
+### default y
+### depends on VOLUMEID
+### help
+### TODO
+
+
+config BUSYBOX_CONFIG_FEATURE_VOLUMEID_XFS
+ bool "xfs filesystem"
+ default BUSYBOX_DEFAULT_FEATURE_VOLUMEID_XFS
+ depends on BUSYBOX_CONFIG_VOLUMEID
+ help
+ TODO
+
+
+endmenu
diff --git a/package/utils/busybox/patches/005-resource_h_include.patch b/package/utils/busybox/patches/001-resource_h_include.patch
index d66d66d..d66d66d 100644
--- a/package/utils/busybox/patches/005-resource_h_include.patch
+++ b/package/utils/busybox/patches/001-resource_h_include.patch
diff --git a/package/utils/busybox/patches/002-passwd_use_md5_hash_by_default_like_it_used_to_be.patch b/package/utils/busybox/patches/002-passwd_use_md5_hash_by_default_like_it_used_to_be.patch
deleted file mode 100644
index ff79f3e..0000000
--- a/package/utils/busybox/patches/002-passwd_use_md5_hash_by_default_like_it_used_to_be.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-From eb80c2a5315ed08bd329448217695375d89732c9 Mon Sep 17 00:00:00 2001
-From: Nicolas Thill <nico@openwrt.org>
-Date: Wed, 9 Nov 2011 18:17:20 +0100
-Subject: [PATCH] passwd: use MD5 hash by default (like it used to be)
-
----
- loginutils/passwd.c | 2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
-
---- a/loginutils/passwd.c
-+++ b/loginutils/passwd.c
-@@ -94,7 +94,7 @@ int passwd_main(int argc UNUSED_PARAM, c
- };
- unsigned opt;
- int rc;
-- const char *opt_a = "d"; /* des */
-+ const char *opt_a = "m"; /* md5 */
- const char *filename;
- char *myname;
- char *name;
diff --git a/package/utils/busybox/patches/002-upstream_ash_fix.patch b/package/utils/busybox/patches/002-upstream_ash_fix.patch
new file mode 100644
index 0000000..46fd7f8
--- /dev/null
+++ b/package/utils/busybox/patches/002-upstream_ash_fix.patch
@@ -0,0 +1,11 @@
+--- a/shell/ash.c
++++ b/shell/ash.c
+@@ -13014,7 +13014,7 @@ init(void)
+ setvar2("PPID", utoa(getppid()));
+ #if ENABLE_ASH_BASH_COMPAT
+ p = lookupvar("SHLVL");
+- setvar2("SHLVL", utoa(p ? atoi(p) + 1 : 1));
++ setvar("SHLVL", utoa((p ? atoi(p) : 0) + 1), VEXPORT);
+ #endif
+ p = lookupvar("PWD");
+ if (p) {
diff --git a/package/utils/busybox/patches/003-brctl_show_fix.patch b/package/utils/busybox/patches/003-brctl_show_fix.patch
deleted file mode 100644
index 8177fb0..0000000
--- a/package/utils/busybox/patches/003-brctl_show_fix.patch
+++ /dev/null
@@ -1,37 +0,0 @@
---- a/networking/brctl.c
-+++ b/networking/brctl.c
-@@ -129,7 +129,7 @@ int brctl_main(int argc UNUSED_PARAM, ch
- "setageing\0" "setfd\0" "sethello\0" "setmaxage\0"
- "setpathcost\0" "setportprio\0" "setbridgeprio\0"
- )
-- IF_FEATURE_BRCTL_SHOW("showmacs\0" "show\0");
-+ IF_FEATURE_BRCTL_SHOW("show\0");
-
- enum { ARG_addbr = 0, ARG_delbr, ARG_addif, ARG_delif
- IF_FEATURE_BRCTL_FANCY(,
-@@ -137,7 +137,7 @@ int brctl_main(int argc UNUSED_PARAM, ch
- ARG_setageing, ARG_setfd, ARG_sethello, ARG_setmaxage,
- ARG_setpathcost, ARG_setportprio, ARG_setbridgeprio
- )
-- IF_FEATURE_BRCTL_SHOW(, ARG_showmacs, ARG_show)
-+ IF_FEATURE_BRCTL_SHOW(, ARG_show)
- };
-
- int fd;
---- a/networking/Config.src
-+++ b/networking/Config.src
-@@ -82,12 +82,12 @@ config FEATURE_BRCTL_FANCY
- This adds about 600 bytes.
-
- config FEATURE_BRCTL_SHOW
-- bool "Support show, showmac and showstp"
-+ bool "Support show"
- default y
- depends on BRCTL && FEATURE_BRCTL_FANCY
- help
- Add support for option which prints the current config:
-- showmacs, showstp, show
-+ show
-
- config DNSD
- bool "dnsd"
diff --git a/package/utils/busybox/patches/003-upstream_date_fix.patch b/package/utils/busybox/patches/003-upstream_date_fix.patch
new file mode 100644
index 0000000..5b389c4
--- /dev/null
+++ b/package/utils/busybox/patches/003-upstream_date_fix.patch
@@ -0,0 +1,30 @@
+--- a/libbb/time.c
++++ b/libbb/time.c
+@@ -68,15 +68,23 @@ void FAST_FUNC parse_datestr(const char
+ /* else end != NUL and we error out */
+ }
+ } else
+- /* yyyy-mm-dd HH */
+- if (sscanf(date_str, "%u-%u-%u %u%c", &ptm->tm_year,
++ if (strchr(date_str, '-')
++ /* Why strchr('-') check?
++ * sscanf below will trash ptm->tm_year, this breaks
++ * if parse_str is "10101010" (iow, "MMddhhmm" form)
++ * because we destroy year. Do these sscanf
++ * only if we saw a dash in parse_str.
++ */
++ /* yyyy-mm-dd HH */
++ && (sscanf(date_str, "%u-%u-%u %u%c", &ptm->tm_year,
+ &ptm->tm_mon, &ptm->tm_mday,
+ &ptm->tm_hour,
+ &end) >= 4
+- /* yyyy-mm-dd */
+- || sscanf(date_str, "%u-%u-%u%c", &ptm->tm_year,
++ /* yyyy-mm-dd */
++ || sscanf(date_str, "%u-%u-%u%c", &ptm->tm_year,
+ &ptm->tm_mon, &ptm->tm_mday,
+ &end) >= 3
++ )
+ ) {
+ ptm->tm_year -= 1900; /* Adjust years */
+ ptm->tm_mon -= 1; /* Adjust month from 1-12 to 0-11 */
diff --git a/package/utils/busybox/patches/004-upstream-percent_decode_in_place.patch b/package/utils/busybox/patches/004-upstream-percent_decode_in_place.patch
deleted file mode 100644
index d94ee47..0000000
--- a/package/utils/busybox/patches/004-upstream-percent_decode_in_place.patch
+++ /dev/null
@@ -1,237 +0,0 @@
-http://git.busybox.net/busybox/commit/?id=dd1061b6a79b0161597799e825bfefc27993ace5
-
-From dd1061b6a79b0161597799e825bfefc27993ace5 Mon Sep 17 00:00:00 2001
-From: Denys Vlasenko <vda.linux@googlemail.com>
-Date: Sun, 11 Sep 2011 21:04:02 +0200
-Subject: [PATCH] wget: URL-decode user:password before base64-encoding it into auth hdr. Closes 3625.
-
-function old new delta
-percent_decode_in_place - 152 +152
-parse_url 304 317 +13
-handle_incoming_and_exit 2795 2798 +3
-httpd_main 763 760 -3
-decodeString 152 - -152
-------------------------------------------------------------------------------
-(add/remove: 2/1 grow/shrink: 2/1 up/down: 168/-155) Total: 13 bytes
-
-Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-
---- a/include/libbb.h
-+++ b/include/libbb.h
-@@ -1570,6 +1570,15 @@ int starts_with_cpu(const char *str) FAS
- unsigned get_cpu_count(void) FAST_FUNC;
-
-
-+/* Use strict=1 if you process input from untrusted source:
-+ * it will return NULL on invalid %xx (bad hex chars)
-+ * and str + 1 if decoded char is / or NUL.
-+ * In non-strict mode, it always succeeds (returns str),
-+ * and also it additionally decoded '+' to space.
-+ */
-+char *percent_decode_in_place(char *str, int strict) FAST_FUNC;
-+
-+
- extern const char bb_uuenc_tbl_base64[];
- extern const char bb_uuenc_tbl_std[];
- void bb_uuencode(char *store, const void *s, int length, const char *tbl) FAST_FUNC;
---- /dev/null
-+++ b/libbb/percent_decode.c
-@@ -0,0 +1,69 @@
-+/* vi: set sw=4 ts=4: */
-+/*
-+ * Licensed under GPLv2 or later, see file LICENSE in this source tree.
-+ */
-+
-+//kbuild:lib-y += percent_decode.o
-+
-+#include "libbb.h"
-+
-+static unsigned hex_to_bin(unsigned char c)
-+{
-+ unsigned v;
-+
-+ v = c - '0';
-+ if (v <= 9)
-+ return v;
-+ /* c | 0x20: letters to lower case, non-letters
-+ * to (potentially different) non-letters */
-+ v = (unsigned)(c | 0x20) - 'a';
-+ if (v <= 5)
-+ return v + 10;
-+ return ~0;
-+/* For testing:
-+void t(char c) { printf("'%c'(%u) %u\n", c, c, hex_to_bin(c)); }
-+int main() { t(0x10); t(0x20); t('0'); t('9'); t('A'); t('F'); t('a'); t('f');
-+t('0'-1); t('9'+1); t('A'-1); t('F'+1); t('a'-1); t('f'+1); return 0; }
-+*/
-+}
-+
-+char* FAST_FUNC percent_decode_in_place(char *str, int strict)
-+{
-+ /* note that decoded string is always shorter than original */
-+ char *src = str;
-+ char *dst = str;
-+ char c;
-+
-+ while ((c = *src++) != '\0') {
-+ unsigned v;
-+
-+ if (!strict && c == '+') {
-+ *dst++ = ' ';
-+ continue;
-+ }
-+ if (c != '%') {
-+ *dst++ = c;
-+ continue;
-+ }
-+ v = hex_to_bin(src[0]);
-+ if (v > 15) {
-+ bad_hex:
-+ if (strict)
-+ return NULL;
-+ *dst++ = '%';
-+ continue;
-+ }
-+ v = (v * 16) | hex_to_bin(src[1]);
-+ if (v > 255)
-+ goto bad_hex;
-+ if (strict && (v == '/' || v == '\0')) {
-+ /* caller takes it as indication of invalid
-+ * (dangerous wrt exploits) chars */
-+ return str + 1;
-+ }
-+ *dst++ = v;
-+ src += 2;
-+ }
-+ *dst = '\0';
-+ return str;
-+}
---- a/networking/httpd.c
-+++ b/networking/httpd.c
-@@ -820,78 +820,6 @@ static char *encodeString(const char *st
- }
- #endif
-
--/*
-- * Given a URL encoded string, convert it to plain ascii.
-- * Since decoding always makes strings smaller, the decode is done in-place.
-- * Thus, callers should xstrdup() the argument if they do not want the
-- * argument modified. The return is the original pointer, allowing this
-- * function to be easily used as arguments to other functions.
-- *
-- * string The first string to decode.
-- * option_d 1 if called for httpd -d
-- *
-- * Returns a pointer to the decoded string (same as input).
-- */
--static unsigned hex_to_bin(unsigned char c)
--{
-- unsigned v;
--
-- v = c - '0';
-- if (v <= 9)
-- return v;
-- /* c | 0x20: letters to lower case, non-letters
-- * to (potentially different) non-letters */
-- v = (unsigned)(c | 0x20) - 'a';
-- if (v <= 5)
-- return v + 10;
-- return ~0;
--/* For testing:
--void t(char c) { printf("'%c'(%u) %u\n", c, c, hex_to_bin(c)); }
--int main() { t(0x10); t(0x20); t('0'); t('9'); t('A'); t('F'); t('a'); t('f');
--t('0'-1); t('9'+1); t('A'-1); t('F'+1); t('a'-1); t('f'+1); return 0; }
--*/
--}
--static char *decodeString(char *orig, int option_d)
--{
-- /* note that decoded string is always shorter than original */
-- char *string = orig;
-- char *ptr = string;
-- char c;
--
-- while ((c = *ptr++) != '\0') {
-- unsigned v;
--
-- if (option_d && c == '+') {
-- *string++ = ' ';
-- continue;
-- }
-- if (c != '%') {
-- *string++ = c;
-- continue;
-- }
-- v = hex_to_bin(ptr[0]);
-- if (v > 15) {
-- bad_hex:
-- if (!option_d)
-- return NULL;
-- *string++ = '%';
-- continue;
-- }
-- v = (v * 16) | hex_to_bin(ptr[1]);
-- if (v > 255)
-- goto bad_hex;
-- if (!option_d && (v == '/' || v == '\0')) {
-- /* caller takes it as indication of invalid
-- * (dangerous wrt exploits) chars */
-- return orig + 1;
-- }
-- *string++ = v;
-- ptr += 2;
-- }
-- *string = '\0';
-- return orig;
--}
--
- #if ENABLE_FEATURE_HTTPD_BASIC_AUTH
- /*
- * Decode a base64 data stream as per rfc1521.
-@@ -1949,7 +1877,7 @@ static void handle_incoming_and_exit(con
- }
-
- /* Decode URL escape sequences */
-- tptr = decodeString(urlcopy, 0);
-+ tptr = percent_decode_in_place(urlcopy, /*strict:*/ 1);
- if (tptr == NULL)
- send_headers_and_exit(HTTP_BAD_REQUEST);
- if (tptr == urlcopy + 1) {
-@@ -2408,7 +2336,7 @@ int httpd_main(int argc UNUSED_PARAM, ch
- , &verbose
- );
- if (opt & OPT_DECODE_URL) {
-- fputs(decodeString(url_for_decode, 1), stdout);
-+ fputs(percent_decode_in_place(url_for_decode, /*strict:*/ 0), stdout);
- return 0;
- }
- #if ENABLE_FEATURE_HTTPD_ENCODE_URL_STR
---- a/networking/wget.c
-+++ b/networking/wget.c
-@@ -298,8 +298,13 @@ static void parse_url(const char *src_ur
-
- sp = strrchr(h->host, '@');
- if (sp != NULL) {
-- h->user = h->host;
-+ // URL-decode "user:password" string before base64-encoding:
-+ // wget http://test:my%20pass@example.com should send
-+ // Authorization: Basic dGVzdDpteSBwYXNz
-+ // which decodes to "test:my pass".
-+ // Standard wget and curl do this too.
- *sp = '\0';
-+ h->user = percent_decode_in_place(h->host, /*strict:*/ 0);
- h->host = sp + 1;
- }
-
-@@ -661,12 +666,6 @@ static void download_one_url(const char
-
- #if ENABLE_FEATURE_WGET_AUTHENTICATION
- if (target.user) {
--//TODO: URL-decode "user:password" string before base64-encoding:
--//wget http://test:my%20pass@example.com should send
--// Authorization: Basic dGVzdDpteSBwYXNz
--//which decodes to "test:my pass", instead of what we send now:
--// Authorization: Basic dGVzdDpteSUyMHBhc3M=
--//Can reuse decodeString() from httpd.c
- fprintf(sfp, "Proxy-Authorization: Basic %s\r\n"+6,
- base64enc(target.user));
- }
diff --git a/package/utils/busybox/patches/004-upstream_iplink_fix.patch b/package/utils/busybox/patches/004-upstream_iplink_fix.patch
new file mode 100644
index 0000000..0e25356
--- /dev/null
+++ b/package/utils/busybox/patches/004-upstream_iplink_fix.patch
@@ -0,0 +1,19 @@
+--- a/networking/libiproute/iplink.c
++++ b/networking/libiproute/iplink.c
+@@ -31,6 +31,16 @@
+ #ifndef IFLA_LINKINFO
+ # define IFLA_LINKINFO 18
+ # define IFLA_INFO_KIND 1
++# define IFLA_INFO_DATA 2
++#endif
++
++#ifndef IFLA_VLAN_MAX
++# define IFLA_VLAN_ID 1
++# define IFLA_VLAN_FLAGS 2
++struct ifla_vlan_flags {
++ uint32_t flags;
++ uint32_t mask;
++};
+ #endif
+
+ /* taken from linux/sockios.h */
diff --git a/package/utils/busybox/patches/005-upstream_nc_fix.patch b/package/utils/busybox/patches/005-upstream_nc_fix.patch
new file mode 100644
index 0000000..1bd2359
--- /dev/null
+++ b/package/utils/busybox/patches/005-upstream_nc_fix.patch
@@ -0,0 +1,15 @@
+--- a/networking/nc_bloaty.c
++++ b/networking/nc_bloaty.c
+@@ -175,9 +175,9 @@ enum {
+ OPT_w = (1 << 5),
+ OPT_l = (1 << 6) * ENABLE_NC_SERVER,
+ OPT_k = (1 << 7) * ENABLE_NC_SERVER,
+- OPT_i = (1 << (7+2*ENABLE_NC_SERVER)) * ENABLE_NC_EXTRA,
+- OPT_o = (1 << (8+2*ENABLE_NC_SERVER)) * ENABLE_NC_EXTRA,
+- OPT_z = (1 << (9+2*ENABLE_NC_SERVER)) * ENABLE_NC_EXTRA,
++ OPT_i = (1 << (6+2*ENABLE_NC_SERVER)) * ENABLE_NC_EXTRA,
++ OPT_o = (1 << (7+2*ENABLE_NC_SERVER)) * ENABLE_NC_EXTRA,
++ OPT_z = (1 << (8+2*ENABLE_NC_SERVER)) * ENABLE_NC_EXTRA,
+ };
+
+ #define o_nflag (option_mask32 & OPT_n)
diff --git a/package/utils/busybox/patches/006-upstream_CVE-2011-2716_fixes.patch b/package/utils/busybox/patches/006-upstream_CVE-2011-2716_fixes.patch
deleted file mode 100644
index 532fcee..0000000
--- a/package/utils/busybox/patches/006-upstream_CVE-2011-2716_fixes.patch
+++ /dev/null
@@ -1,164 +0,0 @@
---- a/networking/udhcp/common.c
-+++ b/networking/udhcp/common.c
-@@ -29,16 +29,16 @@ const struct dhcp_optflag dhcp_optflags[
- // { OPTION_IP | OPTION_LIST , 0x07 }, /* DHCP_LOG_SERVER */
- // { OPTION_IP | OPTION_LIST , 0x08 }, /* DHCP_COOKIE_SERVER */
- { OPTION_IP | OPTION_LIST , 0x09 }, /* DHCP_LPR_SERVER */
-- { OPTION_STRING | OPTION_REQ, 0x0c }, /* DHCP_HOST_NAME */
-+ { OPTION_STRING_HOST | OPTION_REQ, 0x0c }, /* DHCP_HOST_NAME */
- { OPTION_U16 , 0x0d }, /* DHCP_BOOT_SIZE */
-- { OPTION_STRING | OPTION_REQ, 0x0f }, /* DHCP_DOMAIN_NAME */
-+ { OPTION_STRING_HOST | OPTION_REQ, 0x0f }, /* DHCP_DOMAIN_NAME */
- { OPTION_IP , 0x10 }, /* DHCP_SWAP_SERVER */
- { OPTION_STRING , 0x11 }, /* DHCP_ROOT_PATH */
- { OPTION_U8 , 0x17 }, /* DHCP_IP_TTL */
- { OPTION_U16 , 0x1a }, /* DHCP_MTU */
- { OPTION_IP | OPTION_REQ, 0x1c }, /* DHCP_BROADCAST */
- { OPTION_IP_PAIR | OPTION_LIST , 0x21 }, /* DHCP_ROUTES */
-- { OPTION_STRING , 0x28 }, /* DHCP_NIS_DOMAIN */
-+ { OPTION_STRING_HOST , 0x28 }, /* DHCP_NIS_DOMAIN */
- { OPTION_IP | OPTION_LIST , 0x29 }, /* DHCP_NIS_SERVER */
- { OPTION_IP | OPTION_LIST | OPTION_REQ, 0x2a }, /* DHCP_NTP_SERVER */
- { OPTION_IP | OPTION_LIST , 0x2c }, /* DHCP_WINS_SERVER */
-@@ -46,7 +46,7 @@ const struct dhcp_optflag dhcp_optflags[
- { OPTION_IP , 0x36 }, /* DHCP_SERVER_ID */
- { OPTION_STRING , 0x38 }, /* DHCP_ERR_MESSAGE */
- //TODO: must be combined with 'sname' and 'file' handling:
-- { OPTION_STRING , 0x42 }, /* DHCP_TFTP_SERVER_NAME */
-+ { OPTION_STRING_HOST , 0x42 }, /* DHCP_TFTP_SERVER_NAME */
- { OPTION_STRING , 0x43 }, /* DHCP_BOOT_FILE */
- //TODO: not a string, but a set of LASCII strings:
- // { OPTION_STRING , 0x4D }, /* DHCP_USER_CLASS */
-@@ -143,6 +143,7 @@ const uint8_t dhcp_option_lengths[] ALIG
- [OPTION_IP_PAIR] = 8,
- // [OPTION_BOOLEAN] = 1,
- [OPTION_STRING] = 1, /* ignored by udhcp_str2optset */
-+ [OPTION_STRING_HOST] = 1, /* ignored by udhcp_str2optset */
- #if ENABLE_FEATURE_UDHCP_RFC3397
- [OPTION_DNS_STRING] = 1, /* ignored by both udhcp_str2optset and xmalloc_optname_optval */
- [OPTION_SIP_SERVERS] = 1,
-@@ -411,7 +412,9 @@ static NOINLINE void attach_option(
- /* actually 255 is ok too, but adding a space can overlow it */
-
- existing->data = xrealloc(existing->data, OPT_DATA + 1 + old_len + length);
-- if ((optflag->flags & OPTION_TYPE_MASK) == OPTION_STRING) {
-+ if ((optflag->flags & OPTION_TYPE_MASK) == OPTION_STRING
-+ || (optflag->flags & OPTION_TYPE_MASK) == OPTION_STRING_HOST
-+ ) {
- /* add space separator between STRING options in a list */
- existing->data[OPT_DATA + old_len] = ' ';
- old_len++;
-@@ -475,6 +478,7 @@ int FAST_FUNC udhcp_str2optset(const cha
- retval = udhcp_str2nip(val, buffer + 4);
- break;
- case OPTION_STRING:
-+ case OPTION_STRING_HOST:
- #if ENABLE_FEATURE_UDHCP_RFC3397
- case OPTION_DNS_STRING:
- #endif
---- a/networking/udhcp/common.h
-+++ b/networking/udhcp/common.h
-@@ -80,6 +80,9 @@ enum {
- OPTION_IP = 1,
- OPTION_IP_PAIR,
- OPTION_STRING,
-+ /* Opts of STRING_HOST type will be sanitized before they are passed
-+ * to udhcpc script's environment: */
-+ OPTION_STRING_HOST,
- // OPTION_BOOLEAN,
- OPTION_U8,
- OPTION_U16,
---- a/networking/udhcp/dhcpc.c
-+++ b/networking/udhcp/dhcpc.c
-@@ -101,6 +101,7 @@ static const uint8_t len_of_option_as_st
- [OPTION_IP_PAIR ] = sizeof("255.255.255.255 ") * 2,
- [OPTION_STATIC_ROUTES ] = sizeof("255.255.255.255/32 255.255.255.255 "),
- [OPTION_STRING ] = 1,
-+ [OPTION_STRING_HOST ] = 1,
- #if ENABLE_FEATURE_UDHCP_RFC3397
- [OPTION_DNS_STRING ] = 1, /* unused */
- /* Hmmm, this severely overestimates size if SIP_SERVERS option
-@@ -135,6 +136,63 @@ static int mton(uint32_t mask)
- return i;
- }
-
-+/* Check if a given label represents a valid DNS label
-+ * Return pointer to the first character after the label upon success,
-+ * NULL otherwise.
-+ * See RFC1035, 2.3.1
-+ */
-+/* We don't need to be particularly anal. For example, allowing _, hyphen
-+ * at the end, or leading and trailing dots would be ok, since it
-+ * can't be used for attacks. (Leading hyphen can be, if someone uses
-+ * cmd "$hostname"
-+ * in the script: then hostname may be treated as an option)
-+ */
-+static const char *valid_domain_label(const char *label)
-+{
-+ unsigned char ch;
-+ unsigned pos = 0;
-+
-+ for (;;) {
-+ ch = *label;
-+ if ((ch|0x20) < 'a' || (ch|0x20) > 'z') {
-+ if (pos == 0) {
-+ /* label must begin with letter */
-+ return NULL;
-+ }
-+ if (ch < '0' || ch > '9') {
-+ if (ch == '\0' || ch == '.')
-+ return label;
-+ /* DNS allows only '-', but we are more permissive */
-+ if (ch != '-' && ch != '_')
-+ return NULL;
-+ }
-+ }
-+ label++;
-+ pos++;
-+ //Do we want this?
-+ //if (pos > 63) /* NS_MAXLABEL; labels must be 63 chars or less */
-+ // return NULL;
-+ }
-+}
-+
-+/* Check if a given name represents a valid DNS name */
-+/* See RFC1035, 2.3.1 */
-+static int good_hostname(const char *name)
-+{
-+ //const char *start = name;
-+
-+ for (;;) {
-+ name = valid_domain_label(name);
-+ if (!name)
-+ return 0;
-+ if (!name[0])
-+ return 1;
-+ //Do we want this?
-+ //return ((name - start) < 1025); /* NS_MAXDNAME */
-+ name++;
-+ }
-+}
-+
- /* Create "opt_name=opt_value" string */
- static NOINLINE char *xmalloc_optname_optval(uint8_t *option, const struct dhcp_optflag *optflag, const char *opt_name)
- {
-@@ -185,8 +243,11 @@ static NOINLINE char *xmalloc_optname_op
- break;
- }
- case OPTION_STRING:
-+ case OPTION_STRING_HOST:
- memcpy(dest, option, len);
- dest[len] = '\0';
-+ if (type == OPTION_STRING_HOST && !good_hostname(dest))
-+ safe_strncpy(dest, "bad", len);
- return ret; /* Short circuit this case */
- case OPTION_STATIC_ROUTES: {
- /* Option binary format:
-@@ -314,6 +375,7 @@ static char **fill_envp(struct dhcp_pack
- /* +1 element for each option, +2 for subnet option: */
- if (packet) {
- /* note: do not search for "pad" (0) and "end" (255) options */
-+//TODO: change logic to scan packet _once_
- for (i = 1; i < 255; i++) {
- temp = udhcp_get_option(packet, i);
- if (temp) {
diff --git a/package/utils/busybox/patches/007-upstream_mkfs_ext2_fixes.patch b/package/utils/busybox/patches/007-upstream_mkfs_ext2_fixes.patch
deleted file mode 100644
index 8528ee8..0000000
--- a/package/utils/busybox/patches/007-upstream_mkfs_ext2_fixes.patch
+++ /dev/null
@@ -1,1441 +0,0 @@
---- a/e2fsprogs/e2fs_defs.h
-+++ /dev/null
-@@ -1,561 +0,0 @@
--/* vi: set sw=4 ts=4: */
--/*
-- * linux/include/linux/ext2_fs.h
-- *
-- * Copyright (C) 1992, 1993, 1994, 1995
-- * Remy Card (card@masi.ibp.fr)
-- * Laboratoire MASI - Institut Blaise Pascal
-- * Universite Pierre et Marie Curie (Paris VI)
-- *
-- * Copyright (C) 1991, 1992 Linus Torvalds
-- */
--
--#ifndef LINUX_EXT2_FS_H
--#define LINUX_EXT2_FS_H 1
--
--/*
-- * Special inode numbers
-- */
--#define EXT2_BAD_INO 1 /* Bad blocks inode */
--#define EXT2_ROOT_INO 2 /* Root inode */
--#define EXT2_ACL_IDX_INO 3 /* ACL inode */
--#define EXT2_ACL_DATA_INO 4 /* ACL inode */
--#define EXT2_BOOT_LOADER_INO 5 /* Boot loader inode */
--#define EXT2_UNDEL_DIR_INO 6 /* Undelete directory inode */
--#define EXT2_RESIZE_INO 7 /* Reserved group descriptors inode */
--#define EXT2_JOURNAL_INO 8 /* Journal inode */
--
--/* First non-reserved inode for old ext2 filesystems */
--#define EXT2_GOOD_OLD_FIRST_INO 11
--
--/*
-- * The second extended file system magic number
-- */
--#define EXT2_SUPER_MAGIC 0xEF53
--
--/* Assume that user mode programs are passing in an ext2fs superblock, not
-- * a kernel struct super_block. This will allow us to call the feature-test
-- * macros from user land. */
--#define EXT2_SB(sb) (sb)
--
--/*
-- * Maximal count of links to a file
-- */
--#define EXT2_LINK_MAX 32000
--
--/*
-- * Macro-instructions used to manage several block sizes
-- */
--#define EXT2_MIN_BLOCK_LOG_SIZE 10 /* 1024 */
--#define EXT2_MAX_BLOCK_LOG_SIZE 16 /* 65536 */
--#define EXT2_MIN_BLOCK_SIZE (1 << EXT2_MIN_BLOCK_LOG_SIZE)
--#define EXT2_MAX_BLOCK_SIZE (1 << EXT2_MAX_BLOCK_LOG_SIZE)
--#define EXT2_BLOCK_SIZE(s) (EXT2_MIN_BLOCK_SIZE << (s)->s_log_block_size)
--#define EXT2_BLOCK_SIZE_BITS(s) ((s)->s_log_block_size + 10)
--#define EXT2_INODE_SIZE(s) (((s)->s_rev_level == EXT2_GOOD_OLD_REV) ? \
-- EXT2_GOOD_OLD_INODE_SIZE : (s)->s_inode_size)
--#define EXT2_FIRST_INO(s) (((s)->s_rev_level == EXT2_GOOD_OLD_REV) ? \
-- EXT2_GOOD_OLD_FIRST_INO : (s)->s_first_ino)
--#define EXT2_ADDR_PER_BLOCK(s) (EXT2_BLOCK_SIZE(s) / sizeof(uint32_t))
--
--/*
-- * Macro-instructions used to manage fragments
-- */
--#define EXT2_MIN_FRAG_SIZE EXT2_MIN_BLOCK_SIZE
--#define EXT2_MAX_FRAG_SIZE EXT2_MAX_BLOCK_SIZE
--#define EXT2_MIN_FRAG_LOG_SIZE EXT2_MIN_BLOCK_LOG_SIZE
--#define EXT2_FRAG_SIZE(s) (EXT2_MIN_FRAG_SIZE << (s)->s_log_frag_size)
--#define EXT2_FRAGS_PER_BLOCK(s) (EXT2_BLOCK_SIZE(s) / EXT2_FRAG_SIZE(s))
--
--/*
-- * ACL structures
-- */
--struct ext2_acl_header { /* Header of Access Control Lists */
-- uint32_t aclh_size;
-- uint32_t aclh_file_count;
-- uint32_t aclh_acle_count;
-- uint32_t aclh_first_acle;
--};
--
--struct ext2_acl_entry { /* Access Control List Entry */
-- uint32_t acle_size;
-- uint16_t acle_perms; /* Access permissions */
-- uint16_t acle_type; /* Type of entry */
-- uint16_t acle_tag; /* User or group identity */
-- uint16_t acle_pad1;
-- uint32_t acle_next; /* Pointer on next entry for the */
-- /* same inode or on next free entry */
--};
--
--/*
-- * Structure of a blocks group descriptor
-- */
--struct ext2_group_desc {
-- uint32_t bg_block_bitmap; /* Blocks bitmap block */
-- uint32_t bg_inode_bitmap; /* Inodes bitmap block */
-- uint32_t bg_inode_table; /* Inodes table block */
-- uint16_t bg_free_blocks_count; /* Free blocks count */
-- uint16_t bg_free_inodes_count; /* Free inodes count */
-- uint16_t bg_used_dirs_count; /* Directories count */
-- uint16_t bg_pad;
-- uint32_t bg_reserved[3];
--};
--
--/*
-- * Data structures used by the directory indexing feature
-- *
-- * Note: all of the multibyte integer fields are little endian.
-- */
--
--/*
-- * Note: dx_root_info is laid out so that if it should somehow get
-- * overlaid by a dirent the two low bits of the hash version will be
-- * zero. Therefore, the hash version mod 4 should never be 0.
-- * Sincerely, the paranoia department.
-- */
--struct ext2_dx_root_info {
-- uint32_t reserved_zero;
-- uint8_t hash_version; /* 0 now, 1 at release */
-- uint8_t info_length; /* 8 */
-- uint8_t indirect_levels;
-- uint8_t unused_flags;
--};
--
--#define EXT2_HASH_LEGACY 0
--#define EXT2_HASH_HALF_MD4 1
--#define EXT2_HASH_TEA 2
--
--#define EXT2_HASH_FLAG_INCOMPAT 0x1
--
--struct ext2_dx_entry {
-- uint32_t hash;
-- uint32_t block;
--};
--
--struct ext2_dx_countlimit {
-- uint16_t limit;
-- uint16_t count;
--};
--
--
--/*
-- * Macro-instructions used to manage group descriptors
-- */
--#define EXT2_BLOCKS_PER_GROUP(s) (EXT2_SB(s)->s_blocks_per_group)
--#define EXT2_INODES_PER_GROUP(s) (EXT2_SB(s)->s_inodes_per_group)
--#define EXT2_INODES_PER_BLOCK(s) (EXT2_BLOCK_SIZE(s)/EXT2_INODE_SIZE(s))
--/* limits imposed by 16-bit value gd_free_{blocks,inode}_count */
--#define EXT2_MAX_BLOCKS_PER_GROUP(s) ((1 << 16) - 8)
--#define EXT2_MAX_INODES_PER_GROUP(s) ((1 << 16) - EXT2_INODES_PER_BLOCK(s))
--#define EXT2_DESC_PER_BLOCK(s) (EXT2_BLOCK_SIZE(s) / sizeof (struct ext2_group_desc))
--
--/*
-- * Constants relative to the data blocks
-- */
--#define EXT2_NDIR_BLOCKS 12
--#define EXT2_IND_BLOCK EXT2_NDIR_BLOCKS
--#define EXT2_DIND_BLOCK (EXT2_IND_BLOCK + 1)
--#define EXT2_TIND_BLOCK (EXT2_DIND_BLOCK + 1)
--#define EXT2_N_BLOCKS (EXT2_TIND_BLOCK + 1)
--
--/*
-- * Inode flags
-- */
--#define EXT2_SECRM_FL 0x00000001 /* Secure deletion */
--#define EXT2_UNRM_FL 0x00000002 /* Undelete */
--#define EXT2_COMPR_FL 0x00000004 /* Compress file */
--#define EXT2_SYNC_FL 0x00000008 /* Synchronous updates */
--#define EXT2_IMMUTABLE_FL 0x00000010 /* Immutable file */
--#define EXT2_APPEND_FL 0x00000020 /* writes to file may only append */
--#define EXT2_NODUMP_FL 0x00000040 /* do not dump file */
--#define EXT2_NOATIME_FL 0x00000080 /* do not update atime */
--/* Reserved for compression usage... */
--#define EXT2_DIRTY_FL 0x00000100
--#define EXT2_COMPRBLK_FL 0x00000200 /* One or more compressed clusters */
--#define EXT2_NOCOMPR_FL 0x00000400 /* Access raw compressed data */
--#define EXT2_ECOMPR_FL 0x00000800 /* Compression error */
--/* End compression flags --- maybe not all used */
--#define EXT2_BTREE_FL 0x00001000 /* btree format dir */
--#define EXT2_INDEX_FL 0x00001000 /* hash-indexed directory */
--#define EXT2_IMAGIC_FL 0x00002000
--#define EXT3_JOURNAL_DATA_FL 0x00004000 /* file data should be journaled */
--#define EXT2_NOTAIL_FL 0x00008000 /* file tail should not be merged */
--#define EXT2_DIRSYNC_FL 0x00010000 /* Synchronous directory modifications */
--#define EXT2_TOPDIR_FL 0x00020000 /* Top of directory hierarchies*/
--#define EXT3_EXTENTS_FL 0x00080000 /* Inode uses extents */
--#define EXT2_RESERVED_FL 0x80000000 /* reserved for ext2 lib */
--
--#define EXT2_FL_USER_VISIBLE 0x0003DFFF /* User visible flags */
--#define EXT2_FL_USER_MODIFIABLE 0x000080FF /* User modifiable flags */
--
--/*
-- * ioctl commands
-- */
--#define EXT2_IOC_GETFLAGS _IOR('f', 1, long)
--#define EXT2_IOC_SETFLAGS _IOW('f', 2, long)
--#define EXT2_IOC_GETVERSION _IOR('v', 1, long)
--#define EXT2_IOC_SETVERSION _IOW('v', 2, long)
--
--/*
-- * Structure of an inode on the disk
-- */
--struct ext2_inode {
-- uint16_t i_mode; /* File mode */
-- uint16_t i_uid; /* Low 16 bits of Owner Uid */
-- uint32_t i_size; /* Size in bytes */
-- uint32_t i_atime; /* Access time */
-- uint32_t i_ctime; /* Creation time */
-- uint32_t i_mtime; /* Modification time */
-- uint32_t i_dtime; /* Deletion Time */
-- uint16_t i_gid; /* Low 16 bits of Group Id */
-- uint16_t i_links_count; /* Links count */
-- uint32_t i_blocks; /* Blocks count */
-- uint32_t i_flags; /* File flags */
-- union {
-- struct {
-- uint32_t l_i_reserved1;
-- } linux1;
-- struct {
-- uint32_t h_i_translator;
-- } hurd1;
-- struct {
-- uint32_t m_i_reserved1;
-- } masix1;
-- } osd1; /* OS dependent 1 */
-- uint32_t i_block[EXT2_N_BLOCKS];/* Pointers to blocks */
-- uint32_t i_generation; /* File version (for NFS) */
-- uint32_t i_file_acl; /* File ACL */
-- uint32_t i_dir_acl; /* Directory ACL */
-- uint32_t i_faddr; /* Fragment address */
-- union {
-- struct {
-- uint8_t l_i_frag; /* Fragment number */
-- uint8_t l_i_fsize; /* Fragment size */
-- uint16_t i_pad1;
-- uint16_t l_i_uid_high; /* these 2 fields */
-- uint16_t l_i_gid_high; /* were reserved2[0] */
-- uint32_t l_i_reserved2;
-- } linux2;
-- struct {
-- uint8_t h_i_frag; /* Fragment number */
-- uint8_t h_i_fsize; /* Fragment size */
-- uint16_t h_i_mode_high;
-- uint16_t h_i_uid_high;
-- uint16_t h_i_gid_high;
-- uint32_t h_i_author;
-- } hurd2;
-- struct {
-- uint8_t m_i_frag; /* Fragment number */
-- uint8_t m_i_fsize; /* Fragment size */
-- uint16_t m_pad1;
-- uint32_t m_i_reserved2[2];
-- } masix2;
-- } osd2; /* OS dependent 2 */
--};
--
--/*
-- * Permanent part of an large inode on the disk
-- */
--struct ext2_inode_large {
-- uint16_t i_mode; /* File mode */
-- uint16_t i_uid; /* Low 16 bits of Owner Uid */
-- uint32_t i_size; /* Size in bytes */
-- uint32_t i_atime; /* Access time */
-- uint32_t i_ctime; /* Creation time */
-- uint32_t i_mtime; /* Modification time */
-- uint32_t i_dtime; /* Deletion Time */
-- uint16_t i_gid; /* Low 16 bits of Group Id */
-- uint16_t i_links_count; /* Links count */
-- uint32_t i_blocks; /* Blocks count */
-- uint32_t i_flags; /* File flags */
-- union {
-- struct {
-- uint32_t l_i_reserved1;
-- } linux1;
-- struct {
-- uint32_t h_i_translator;
-- } hurd1;
-- struct {
-- uint32_t m_i_reserved1;
-- } masix1;
-- } osd1; /* OS dependent 1 */
-- uint32_t i_block[EXT2_N_BLOCKS];/* Pointers to blocks */
-- uint32_t i_generation; /* File version (for NFS) */
-- uint32_t i_file_acl; /* File ACL */
-- uint32_t i_dir_acl; /* Directory ACL */
-- uint32_t i_faddr; /* Fragment address */
-- union {
-- struct {
-- uint8_t l_i_frag; /* Fragment number */
-- uint8_t l_i_fsize; /* Fragment size */
-- uint16_t i_pad1;
-- uint16_t l_i_uid_high; /* these 2 fields */
-- uint16_t l_i_gid_high; /* were reserved2[0] */
-- uint32_t l_i_reserved2;
-- } linux2;
-- struct {
-- uint8_t h_i_frag; /* Fragment number */
-- uint8_t h_i_fsize; /* Fragment size */
-- uint16_t h_i_mode_high;
-- uint16_t h_i_uid_high;
-- uint16_t h_i_gid_high;
-- uint32_t h_i_author;
-- } hurd2;
-- struct {
-- uint8_t m_i_frag; /* Fragment number */
-- uint8_t m_i_fsize; /* Fragment size */
-- uint16_t m_pad1;
-- uint32_t m_i_reserved2[2];
-- } masix2;
-- } osd2; /* OS dependent 2 */
-- uint16_t i_extra_isize;
-- uint16_t i_pad1;
--};
--
--#define i_size_high i_dir_acl
--
--/*
-- * File system states
-- */
--#define EXT2_VALID_FS 0x0001 /* Unmounted cleanly */
--#define EXT2_ERROR_FS 0x0002 /* Errors detected */
--
--/*
-- * Mount flags
-- */
--#define EXT2_MOUNT_CHECK 0x0001 /* Do mount-time checks */
--#define EXT2_MOUNT_GRPID 0x0004 /* Create files with directory's group */
--#define EXT2_MOUNT_DEBUG 0x0008 /* Some debugging messages */
--#define EXT2_MOUNT_ERRORS_CONT 0x0010 /* Continue on errors */
--#define EXT2_MOUNT_ERRORS_RO 0x0020 /* Remount fs ro on errors */
--#define EXT2_MOUNT_ERRORS_PANIC 0x0040 /* Panic on errors */
--#define EXT2_MOUNT_MINIX_DF 0x0080 /* Mimics the Minix statfs */
--#define EXT2_MOUNT_NO_UID32 0x0200 /* Disable 32-bit UIDs */
--
--#define clear_opt(o, opt) o &= ~EXT2_MOUNT_##opt
--#define set_opt(o, opt) o |= EXT2_MOUNT_##opt
--#define test_opt(sb, opt) (EXT2_SB(sb)->s_mount_opt & \
-- EXT2_MOUNT_##opt)
--/*
-- * Maximal mount counts between two filesystem checks
-- */
--#define EXT2_DFL_MAX_MNT_COUNT 20 /* Allow 20 mounts */
--#define EXT2_DFL_CHECKINTERVAL 0 /* Don't use interval check */
--
--/*
-- * Behaviour when detecting errors
-- */
--#define EXT2_ERRORS_CONTINUE 1 /* Continue execution */
--#define EXT2_ERRORS_RO 2 /* Remount fs read-only */
--#define EXT2_ERRORS_PANIC 3 /* Panic */
--#define EXT2_ERRORS_DEFAULT EXT2_ERRORS_CONTINUE
--
--/*
-- * Structure of the super block
-- */
--struct ext2_super_block {
-- uint32_t s_inodes_count; /* Inodes count */
-- uint32_t s_blocks_count; /* Blocks count */
-- uint32_t s_r_blocks_count; /* Reserved blocks count */
-- uint32_t s_free_blocks_count; /* Free blocks count */
-- uint32_t s_free_inodes_count; /* Free inodes count */
-- uint32_t s_first_data_block; /* First Data Block */
-- uint32_t s_log_block_size; /* Block size */
-- int32_t s_log_frag_size; /* Fragment size */
-- uint32_t s_blocks_per_group; /* # Blocks per group */
-- uint32_t s_frags_per_group; /* # Fragments per group */
-- uint32_t s_inodes_per_group; /* # Inodes per group */
-- uint32_t s_mtime; /* Mount time */
-- uint32_t s_wtime; /* Write time */
-- uint16_t s_mnt_count; /* Mount count */
-- int16_t s_max_mnt_count; /* Maximal mount count */
-- uint16_t s_magic; /* Magic signature */
-- uint16_t s_state; /* File system state */
-- uint16_t s_errors; /* Behaviour when detecting errors */
-- uint16_t s_minor_rev_level; /* minor revision level */
-- uint32_t s_lastcheck; /* time of last check */
-- uint32_t s_checkinterval; /* max. time between checks */
-- uint32_t s_creator_os; /* OS */
-- uint32_t s_rev_level; /* Revision level */
-- uint16_t s_def_resuid; /* Default uid for reserved blocks */
-- uint16_t s_def_resgid; /* Default gid for reserved blocks */
-- /*
-- * These fields are for EXT2_DYNAMIC_REV superblocks only.
-- *
-- * Note: the difference between the compatible feature set and
-- * the incompatible feature set is that if there is a bit set
-- * in the incompatible feature set that the kernel doesn't
-- * know about, it should refuse to mount the filesystem.
-- *
-- * e2fsck's requirements are more strict; if it doesn't know
-- * about a feature in either the compatible or incompatible
-- * feature set, it must abort and not try to meddle with
-- * things it doesn't understand...
-- */
-- uint32_t s_first_ino; /* First non-reserved inode */
-- uint16_t s_inode_size; /* size of inode structure */
-- uint16_t s_block_group_nr; /* block group # of this superblock */
-- uint32_t s_feature_compat; /* compatible feature set */
-- uint32_t s_feature_incompat; /* incompatible feature set */
-- uint32_t s_feature_ro_compat; /* readonly-compatible feature set */
-- uint8_t s_uuid[16]; /* 128-bit uuid for volume */
-- char s_volume_name[16]; /* volume name */
-- char s_last_mounted[64]; /* directory where last mounted */
-- uint32_t s_algorithm_usage_bitmap; /* For compression */
-- /*
-- * Performance hints. Directory preallocation should only
-- * happen if the EXT2_FEATURE_COMPAT_DIR_PREALLOC flag is on.
-- */
-- uint8_t s_prealloc_blocks; /* Nr of blocks to try to preallocate*/
-- uint8_t s_prealloc_dir_blocks; /* Nr to preallocate for dirs */
-- uint16_t s_reserved_gdt_blocks; /* Per group table for online growth */
-- /*
-- * Journaling support valid if EXT2_FEATURE_COMPAT_HAS_JOURNAL set.
-- */
-- uint8_t s_journal_uuid[16]; /* uuid of journal superblock */
-- uint32_t s_journal_inum; /* inode number of journal file */
-- uint32_t s_journal_dev; /* device number of journal file */
-- uint32_t s_last_orphan; /* start of list of inodes to delete */
-- uint32_t s_hash_seed[4]; /* HTREE hash seed */
-- uint8_t s_def_hash_version; /* Default hash version to use */
-- uint8_t s_jnl_backup_type; /* Default type of journal backup */
-- uint16_t s_reserved_word_pad;
-- uint32_t s_default_mount_opts;
-- uint32_t s_first_meta_bg; /* First metablock group */
-- uint32_t s_mkfs_time; /* When the filesystem was created */
-- uint32_t s_jnl_blocks[17]; /* Backup of the journal inode */
-- uint32_t s_reserved[172]; /* Padding to the end of the block */
--};
--
--/*
-- * Codes for operating systems
-- */
--#define EXT2_OS_LINUX 0
--#define EXT2_OS_HURD 1
--#define EXT2_OS_MASIX 2
--#define EXT2_OS_FREEBSD 3
--#define EXT2_OS_LITES 4
--
--/*
-- * Revision levels
-- */
--#define EXT2_GOOD_OLD_REV 0 /* The good old (original) format */
--#define EXT2_DYNAMIC_REV 1 /* V2 format w/ dynamic inode sizes */
--
--#define EXT2_CURRENT_REV EXT2_GOOD_OLD_REV
--#define EXT2_MAX_SUPP_REV EXT2_DYNAMIC_REV
--
--#define EXT2_GOOD_OLD_INODE_SIZE 128
--
--/*
-- * Journal inode backup types
-- */
--#define EXT3_JNL_BACKUP_BLOCKS 1
--
--/*
-- * Feature set definitions
-- */
--
--#define EXT2_HAS_COMPAT_FEATURE(sb,mask) \
-- ( EXT2_SB(sb)->s_feature_compat & (mask) )
--#define EXT2_HAS_RO_COMPAT_FEATURE(sb,mask) \
-- ( EXT2_SB(sb)->s_feature_ro_compat & (mask) )
--#define EXT2_HAS_INCOMPAT_FEATURE(sb,mask) \
-- ( EXT2_SB(sb)->s_feature_incompat & (mask) )
--
--#define EXT2_FEATURE_COMPAT_DIR_PREALLOC 0x0001
--#define EXT2_FEATURE_COMPAT_IMAGIC_INODES 0x0002
--#define EXT3_FEATURE_COMPAT_HAS_JOURNAL 0x0004
--#define EXT2_FEATURE_COMPAT_EXT_ATTR 0x0008
--#define EXT2_FEATURE_COMPAT_RESIZE_INODE 0x0010
--#define EXT2_FEATURE_COMPAT_DIR_INDEX 0x0020
--
--#define EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER 0x0001
--#define EXT2_FEATURE_RO_COMPAT_LARGE_FILE 0x0002
--/* #define EXT2_FEATURE_RO_COMPAT_BTREE_DIR 0x0004 not used */
--
--#define EXT2_FEATURE_INCOMPAT_COMPRESSION 0x0001
--#define EXT2_FEATURE_INCOMPAT_FILETYPE 0x0002
--#define EXT3_FEATURE_INCOMPAT_RECOVER 0x0004 /* Needs recovery */
--#define EXT3_FEATURE_INCOMPAT_JOURNAL_DEV 0x0008 /* Journal device */
--#define EXT2_FEATURE_INCOMPAT_META_BG 0x0010
--#define EXT3_FEATURE_INCOMPAT_EXTENTS 0x0040
--
--
--#define EXT2_FEATURE_COMPAT_SUPP 0
--#define EXT2_FEATURE_INCOMPAT_SUPP (EXT2_FEATURE_INCOMPAT_FILETYPE)
--#define EXT2_FEATURE_RO_COMPAT_SUPP (EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER| \
-- EXT2_FEATURE_RO_COMPAT_LARGE_FILE| \
-- EXT2_FEATURE_RO_COMPAT_BTREE_DIR)
--
--/*
-- * Default values for user and/or group using reserved blocks
-- */
--#define EXT2_DEF_RESUID 0
--#define EXT2_DEF_RESGID 0
--
--/*
-- * Default mount options
-- */
--#define EXT2_DEFM_DEBUG 0x0001
--#define EXT2_DEFM_BSDGROUPS 0x0002
--#define EXT2_DEFM_XATTR_USER 0x0004
--#define EXT2_DEFM_ACL 0x0008
--#define EXT2_DEFM_UID16 0x0010
--#define EXT3_DEFM_JMODE 0x0060
--#define EXT3_DEFM_JMODE_DATA 0x0020
--#define EXT3_DEFM_JMODE_ORDERED 0x0040
--#define EXT3_DEFM_JMODE_WBACK 0x0060
--
--/*
-- * Structure of a directory entry
-- */
--#define EXT2_NAME_LEN 255
--
--struct ext2_dir_entry {
-- uint32_t inode; /* Inode number */
-- uint16_t rec_len; /* Directory entry length */
-- uint16_t name_len; /* Name length */
-- char name[EXT2_NAME_LEN]; /* File name */
--};
--
--/*
-- * The new version of the directory entry. Since EXT2 structures are
-- * stored in intel byte order, and the name_len field could never be
-- * bigger than 255 chars, it's safe to reclaim the extra byte for the
-- * file_type field.
-- */
--struct ext2_dir_entry_2 {
-- uint32_t inode; /* Inode number */
-- uint16_t rec_len; /* Directory entry length */
-- uint8_t name_len; /* Name length */
-- uint8_t file_type;
-- char name[EXT2_NAME_LEN]; /* File name */
--};
--
--/*
-- * Ext2 directory file types. Only the low 3 bits are used. The
-- * other bits are reserved for now.
-- */
--#define EXT2_FT_UNKNOWN 0
--#define EXT2_FT_REG_FILE 1
--#define EXT2_FT_DIR 2
--#define EXT2_FT_CHRDEV 3
--#define EXT2_FT_BLKDEV 4
--#define EXT2_FT_FIFO 5
--#define EXT2_FT_SOCK 6
--#define EXT2_FT_SYMLINK 7
--
--#define EXT2_FT_MAX 8
--
--/*
-- * EXT2_DIR_PAD defines the directory entries boundaries
-- *
-- * NOTE: It must be a multiple of 4
-- */
--#define EXT2_DIR_PAD 4
--#define EXT2_DIR_ROUND (EXT2_DIR_PAD - 1)
--#define EXT2_DIR_REC_LEN(name_len) (((name_len) + 8 + EXT2_DIR_ROUND) & \
-- ~EXT2_DIR_ROUND)
--
--#endif
---- a/e2fsprogs/e2fs_lib.h
-+++ b/e2fsprogs/e2fs_lib.h
-@@ -7,7 +7,7 @@
- */
-
- /* Constants and structures */
--#include "e2fs_defs.h"
-+#include "bb_e2fs_defs.h"
-
- PUSH_AND_SET_FUNCTION_VISIBILITY_TO_HIDDEN
-
---- a/e2fsprogs/old_e2fsprogs/e2fsck.c
-+++ b/e2fsprogs/old_e2fsprogs/e2fsck.c
-@@ -11577,7 +11577,7 @@ static void check_resize_inode(e2fsck_t
- * s_reserved_gdt_blocks must be zero.
- */
- if (!(fs->super->s_feature_compat &
-- EXT2_FEATURE_COMPAT_RESIZE_INODE)) {
-+ EXT2_FEATURE_COMPAT_RESIZE_INO)) {
- if (fs->super->s_reserved_gdt_blocks) {
- pctx.num = fs->super->s_reserved_gdt_blocks;
- if (fix_problem(ctx, PR_0_NONZERO_RESERVED_GDT_BLOCKS,
-@@ -11593,7 +11593,7 @@ static void check_resize_inode(e2fsck_t
- retval = ext2fs_read_inode(fs, EXT2_RESIZE_INO, &inode);
- if (retval) {
- if (fs->super->s_feature_compat &
-- EXT2_FEATURE_COMPAT_RESIZE_INODE)
-+ EXT2_FEATURE_COMPAT_RESIZE_INO)
- ctx->flags |= E2F_FLAG_RESIZE_INODE;
- return;
- }
-@@ -11603,7 +11603,7 @@ static void check_resize_inode(e2fsck_t
- * the resize inode is cleared; then we're done.
- */
- if (!(fs->super->s_feature_compat &
-- EXT2_FEATURE_COMPAT_RESIZE_INODE)) {
-+ EXT2_FEATURE_COMPAT_RESIZE_INO)) {
- for (i=0; i < EXT2_N_BLOCKS; i++) {
- if (inode.i_block[i])
- break;
---- a/e2fsprogs/old_e2fsprogs/e2p/feature.c
-+++ b/e2fsprogs/old_e2fsprogs/e2p/feature.c
-@@ -34,7 +34,7 @@ static const struct feature feature_list
- "ext_attr" },
- { E2P_FEATURE_COMPAT, EXT2_FEATURE_COMPAT_DIR_INDEX,
- "dir_index" },
-- { E2P_FEATURE_COMPAT, EXT2_FEATURE_COMPAT_RESIZE_INODE,
-+ { E2P_FEATURE_COMPAT, EXT2_FEATURE_COMPAT_RESIZE_INO,
- "resize_inode" },
- { E2P_FEATURE_RO_INCOMPAT, EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER,
- "sparse_super" },
---- a/e2fsprogs/old_e2fsprogs/ext2fs/ext2_fs.h
-+++ b/e2fsprogs/old_e2fsprogs/ext2fs/ext2_fs.h
-@@ -475,7 +475,7 @@ struct ext2_super_block {
- #define EXT2_FEATURE_COMPAT_IMAGIC_INODES 0x0002
- #define EXT3_FEATURE_COMPAT_HAS_JOURNAL 0x0004
- #define EXT2_FEATURE_COMPAT_EXT_ATTR 0x0008
--#define EXT2_FEATURE_COMPAT_RESIZE_INODE 0x0010
-+#define EXT2_FEATURE_COMPAT_RESIZE_INO 0x0010
- #define EXT2_FEATURE_COMPAT_DIR_INDEX 0x0020
-
- #define EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER 0x0001
---- a/e2fsprogs/old_e2fsprogs/ext2fs/ext2fs.h
-+++ b/e2fsprogs/old_e2fsprogs/ext2fs/ext2fs.h
-@@ -383,7 +383,7 @@ typedef struct ext2_icount *ext2_icount_
- #define EXT2_LIB_FEATURE_COMPAT_SUPP (EXT2_FEATURE_COMPAT_DIR_PREALLOC|\
- EXT2_FEATURE_COMPAT_IMAGIC_INODES|\
- EXT3_FEATURE_COMPAT_HAS_JOURNAL|\
-- EXT2_FEATURE_COMPAT_RESIZE_INODE|\
-+ EXT2_FEATURE_COMPAT_RESIZE_INO|\
- EXT2_FEATURE_COMPAT_DIR_INDEX|\
- EXT2_FEATURE_COMPAT_EXT_ATTR)
-
---- a/e2fsprogs/old_e2fsprogs/ext2fs/initialize.c
-+++ b/e2fsprogs/old_e2fsprogs/ext2fs/initialize.c
-@@ -284,7 +284,7 @@ retry:
- /*
- * check the number of reserved group descriptor table blocks
- */
-- if (super->s_feature_compat & EXT2_FEATURE_COMPAT_RESIZE_INODE)
-+ if (super->s_feature_compat & EXT2_FEATURE_COMPAT_RESIZE_INO)
- rsv_gdt = calc_reserved_gdt_blocks(fs);
- else
- rsv_gdt = 0;
---- a/e2fsprogs/old_e2fsprogs/mke2fs.c
-+++ b/e2fsprogs/old_e2fsprogs/mke2fs.c
-@@ -757,7 +757,7 @@ static void parse_extended_opts(struct e
-
- if (rsv_gdb > 0) {
- sb_param->s_feature_compat |=
-- EXT2_FEATURE_COMPAT_RESIZE_INODE;
-+ EXT2_FEATURE_COMPAT_RESIZE_INO;
-
- sb_param->s_reserved_gdt_blocks = rsv_gdb;
- }
-@@ -778,7 +778,7 @@ static void parse_extended_opts(struct e
-
- static __u32 ok_features[3] = {
- EXT3_FEATURE_COMPAT_HAS_JOURNAL |
-- EXT2_FEATURE_COMPAT_RESIZE_INODE |
-+ EXT2_FEATURE_COMPAT_RESIZE_INO |
- EXT2_FEATURE_COMPAT_DIR_INDEX, /* Compat */
- EXT2_FEATURE_INCOMPAT_FILETYPE| /* Incompat */
- EXT3_FEATURE_INCOMPAT_JOURNAL_DEV|
-@@ -1123,7 +1123,7 @@ static int PRS(int argc, char **argv)
- /* Since sparse_super is the default, we would only have a problem
- * here if it was explicitly disabled.
- */
-- if ((param.s_feature_compat & EXT2_FEATURE_COMPAT_RESIZE_INODE) &&
-+ if ((param.s_feature_compat & EXT2_FEATURE_COMPAT_RESIZE_INO) &&
- !(param.s_feature_ro_compat&EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER)) {
- bb_error_msg_and_die("reserved online resize blocks not supported "
- "on non-sparse filesystem");
-@@ -1312,7 +1312,7 @@ int mke2fs_main (int argc, char **argv)
- reserve_inodes(fs);
- create_bad_block_inode(fs, bb_list);
- if (fs->super->s_feature_compat &
-- EXT2_FEATURE_COMPAT_RESIZE_INODE) {
-+ EXT2_FEATURE_COMPAT_RESIZE_INO) {
- retval = ext2fs_create_resize_inode(fs);
- mke2fs_error_msg_and_die(retval, "reserve blocks for online resize");
- }
---- a/e2fsprogs/tune2fs.c
-+++ b/e2fsprogs/tune2fs.c
-@@ -8,7 +8,7 @@
- */
- #include "libbb.h"
- #include <linux/fs.h>
--#include <linux/ext2_fs.h>
-+#include "bb_e2fs_defs.h"
-
- // storage helpers
- char BUG_wrong_field_size(void);
---- /dev/null
-+++ b/include/bb_e2fs_defs.h
-@@ -0,0 +1,602 @@
-+/* vi: set sw=4 ts=4: */
-+/*
-+ * linux/include/linux/ext2_fs.h
-+ *
-+ * Copyright (C) 1992, 1993, 1994, 1995
-+ * Remy Card (card@masi.ibp.fr)
-+ * Laboratoire MASI - Institut Blaise Pascal
-+ * Universite Pierre et Marie Curie (Paris VI)
-+ *
-+ * Copyright (C) 1991, 1992 Linus Torvalds
-+ */
-+
-+#ifndef LINUX_EXT2_FS_H
-+#define LINUX_EXT2_FS_H 1
-+
-+/*
-+ * Special inode numbers
-+ */
-+#define EXT2_BAD_INO 1 /* Bad blocks inode */
-+#define EXT2_ROOT_INO 2 /* Root inode */
-+#define EXT2_ACL_IDX_INO 3 /* ACL inode */
-+#define EXT2_ACL_DATA_INO 4 /* ACL inode */
-+#define EXT2_BOOT_LOADER_INO 5 /* Boot loader inode */
-+#define EXT2_UNDEL_DIR_INO 6 /* Undelete directory inode */
-+#define EXT2_RESIZE_INO 7 /* Reserved group descriptors inode */
-+#define EXT2_JOURNAL_INO 8 /* Journal inode */
-+
-+/* First non-reserved inode for old ext2 filesystems */
-+#define EXT2_GOOD_OLD_FIRST_INO 11
-+
-+/*
-+ * The second extended file system magic number
-+ */
-+#define EXT2_SUPER_MAGIC 0xEF53
-+
-+/* Assume that user mode programs are passing in an ext2fs superblock, not
-+ * a kernel struct super_block. This will allow us to call the feature-test
-+ * macros from user land. */
-+#define EXT2_SB(sb) (sb)
-+
-+/*
-+ * Maximal count of links to a file
-+ */
-+#define EXT2_LINK_MAX 32000
-+
-+/*
-+ * Macro-instructions used to manage several block sizes
-+ */
-+#define EXT2_MIN_BLOCK_LOG_SIZE 10 /* 1024 */
-+#define EXT2_MAX_BLOCK_LOG_SIZE 16 /* 65536 */
-+#define EXT2_MIN_BLOCK_SIZE (1 << EXT2_MIN_BLOCK_LOG_SIZE)
-+#define EXT2_MAX_BLOCK_SIZE (1 << EXT2_MAX_BLOCK_LOG_SIZE)
-+#define EXT2_BLOCK_SIZE(s) (EXT2_MIN_BLOCK_SIZE << (s)->s_log_block_size)
-+#define EXT2_BLOCK_SIZE_BITS(s) ((s)->s_log_block_size + 10)
-+#define EXT2_INODE_SIZE(s) (((s)->s_rev_level == EXT2_GOOD_OLD_REV) ? \
-+ EXT2_GOOD_OLD_INODE_SIZE : (s)->s_inode_size)
-+#define EXT2_FIRST_INO(s) (((s)->s_rev_level == EXT2_GOOD_OLD_REV) ? \
-+ EXT2_GOOD_OLD_FIRST_INO : (s)->s_first_ino)
-+#define EXT2_ADDR_PER_BLOCK(s) (EXT2_BLOCK_SIZE(s) / sizeof(uint32_t))
-+
-+/*
-+ * Macro-instructions used to manage fragments
-+ */
-+#define EXT2_MIN_FRAG_SIZE EXT2_MIN_BLOCK_SIZE
-+#define EXT2_MAX_FRAG_SIZE EXT2_MAX_BLOCK_SIZE
-+#define EXT2_MIN_FRAG_LOG_SIZE EXT2_MIN_BLOCK_LOG_SIZE
-+#define EXT2_FRAG_SIZE(s) (EXT2_MIN_FRAG_SIZE << (s)->s_log_frag_size)
-+#define EXT2_FRAGS_PER_BLOCK(s) (EXT2_BLOCK_SIZE(s) / EXT2_FRAG_SIZE(s))
-+
-+/*
-+ * ACL structures
-+ */
-+struct ext2_acl_header { /* Header of Access Control Lists */
-+ uint32_t aclh_size;
-+ uint32_t aclh_file_count;
-+ uint32_t aclh_acle_count;
-+ uint32_t aclh_first_acle;
-+};
-+
-+struct ext2_acl_entry { /* Access Control List Entry */
-+ uint32_t acle_size;
-+ uint16_t acle_perms; /* Access permissions */
-+ uint16_t acle_type; /* Type of entry */
-+ uint16_t acle_tag; /* User or group identity */
-+ uint16_t acle_pad1;
-+ uint32_t acle_next; /* Pointer on next entry for the */
-+ /* same inode or on next free entry */
-+};
-+
-+/*
-+ * Structure of a blocks group descriptor
-+ */
-+struct ext2_group_desc {
-+ uint32_t bg_block_bitmap; /* Blocks bitmap block */
-+ uint32_t bg_inode_bitmap; /* Inodes bitmap block */
-+ uint32_t bg_inode_table; /* Inodes table block */
-+ uint16_t bg_free_blocks_count; /* Free blocks count */
-+ uint16_t bg_free_inodes_count; /* Free inodes count */
-+ uint16_t bg_used_dirs_count; /* Directories count */
-+ uint16_t bg_pad;
-+ uint32_t bg_reserved[3];
-+};
-+
-+/*
-+ * Data structures used by the directory indexing feature
-+ *
-+ * Note: all of the multibyte integer fields are little endian.
-+ */
-+
-+/*
-+ * Note: dx_root_info is laid out so that if it should somehow get
-+ * overlaid by a dirent the two low bits of the hash version will be
-+ * zero. Therefore, the hash version mod 4 should never be 0.
-+ * Sincerely, the paranoia department.
-+ */
-+struct ext2_dx_root_info {
-+ uint32_t reserved_zero;
-+ uint8_t hash_version; /* 0 now, 1 at release */
-+ uint8_t info_length; /* 8 */
-+ uint8_t indirect_levels;
-+ uint8_t unused_flags;
-+};
-+
-+#define EXT2_HASH_LEGACY 0
-+#define EXT2_HASH_HALF_MD4 1
-+#define EXT2_HASH_TEA 2
-+
-+#define EXT2_HASH_FLAG_INCOMPAT 0x1
-+
-+struct ext2_dx_entry {
-+ uint32_t hash;
-+ uint32_t block;
-+};
-+
-+struct ext2_dx_countlimit {
-+ uint16_t limit;
-+ uint16_t count;
-+};
-+
-+
-+/*
-+ * Macro-instructions used to manage group descriptors
-+ */
-+#define EXT2_BLOCKS_PER_GROUP(s) (EXT2_SB(s)->s_blocks_per_group)
-+#define EXT2_INODES_PER_GROUP(s) (EXT2_SB(s)->s_inodes_per_group)
-+#define EXT2_INODES_PER_BLOCK(s) (EXT2_BLOCK_SIZE(s)/EXT2_INODE_SIZE(s))
-+/* limits imposed by 16-bit value gd_free_{blocks,inode}_count */
-+#define EXT2_MAX_BLOCKS_PER_GROUP(s) ((1 << 16) - 8)
-+#define EXT2_MAX_INODES_PER_GROUP(s) ((1 << 16) - EXT2_INODES_PER_BLOCK(s))
-+#define EXT2_DESC_PER_BLOCK(s) (EXT2_BLOCK_SIZE(s) / sizeof (struct ext2_group_desc))
-+
-+/*
-+ * Constants relative to the data blocks
-+ */
-+#define EXT2_NDIR_BLOCKS 12
-+#define EXT2_IND_BLOCK EXT2_NDIR_BLOCKS
-+#define EXT2_DIND_BLOCK (EXT2_IND_BLOCK + 1)
-+#define EXT2_TIND_BLOCK (EXT2_DIND_BLOCK + 1)
-+#define EXT2_N_BLOCKS (EXT2_TIND_BLOCK + 1)
-+
-+/*
-+ * Inode flags
-+ */
-+#define EXT2_SECRM_FL 0x00000001 /* Secure deletion */
-+#define EXT2_UNRM_FL 0x00000002 /* Undelete */
-+#define EXT2_COMPR_FL 0x00000004 /* Compress file */
-+#define EXT2_SYNC_FL 0x00000008 /* Synchronous updates */
-+#define EXT2_IMMUTABLE_FL 0x00000010 /* Immutable file */
-+#define EXT2_APPEND_FL 0x00000020 /* writes to file may only append */
-+#define EXT2_NODUMP_FL 0x00000040 /* do not dump file */
-+#define EXT2_NOATIME_FL 0x00000080 /* do not update atime */
-+/* Reserved for compression usage... */
-+#define EXT2_DIRTY_FL 0x00000100
-+#define EXT2_COMPRBLK_FL 0x00000200 /* One or more compressed clusters */
-+#define EXT2_NOCOMPR_FL 0x00000400 /* Access raw compressed data */
-+#define EXT2_ECOMPR_FL 0x00000800 /* Compression error */
-+/* End compression flags --- maybe not all used */
-+#define EXT2_BTREE_FL 0x00001000 /* btree format dir */
-+#define EXT2_INDEX_FL 0x00001000 /* hash-indexed directory */
-+#define EXT2_IMAGIC_FL 0x00002000
-+#define EXT3_JOURNAL_DATA_FL 0x00004000 /* file data should be journaled */
-+#define EXT2_NOTAIL_FL 0x00008000 /* file tail should not be merged */
-+#define EXT2_DIRSYNC_FL 0x00010000 /* Synchronous directory modifications */
-+#define EXT2_TOPDIR_FL 0x00020000 /* Top of directory hierarchies*/
-+#define EXT3_EXTENTS_FL 0x00080000 /* Inode uses extents */
-+#define EXT2_RESERVED_FL 0x80000000 /* reserved for ext2 lib */
-+
-+#define EXT2_FL_USER_VISIBLE 0x0003DFFF /* User visible flags */
-+#define EXT2_FL_USER_MODIFIABLE 0x000080FF /* User modifiable flags */
-+
-+/*
-+ * ioctl commands
-+ */
-+#define EXT2_IOC_GETFLAGS _IOR('f', 1, long)
-+#define EXT2_IOC_SETFLAGS _IOW('f', 2, long)
-+#define EXT2_IOC_GETVERSION _IOR('v', 1, long)
-+#define EXT2_IOC_SETVERSION _IOW('v', 2, long)
-+
-+/*
-+ * Structure of an inode on the disk
-+ */
-+struct ext2_inode {
-+ uint16_t i_mode; /* File mode */
-+ uint16_t i_uid; /* Low 16 bits of Owner Uid */
-+ uint32_t i_size; /* Size in bytes */
-+ uint32_t i_atime; /* Access time */
-+ uint32_t i_ctime; /* Creation time */
-+ uint32_t i_mtime; /* Modification time */
-+ uint32_t i_dtime; /* Deletion Time */
-+ uint16_t i_gid; /* Low 16 bits of Group Id */
-+ uint16_t i_links_count; /* Links count */
-+ uint32_t i_blocks; /* Blocks count */
-+ uint32_t i_flags; /* File flags */
-+ union {
-+ struct {
-+ uint32_t l_i_reserved1;
-+ } linux1;
-+ struct {
-+ uint32_t h_i_translator;
-+ } hurd1;
-+ struct {
-+ uint32_t m_i_reserved1;
-+ } masix1;
-+ } osd1; /* OS dependent 1 */
-+ uint32_t i_block[EXT2_N_BLOCKS];/* Pointers to blocks */
-+ uint32_t i_generation; /* File version (for NFS) */
-+ uint32_t i_file_acl; /* File ACL */
-+ uint32_t i_dir_acl; /* Directory ACL */
-+ uint32_t i_faddr; /* Fragment address */
-+ union {
-+ struct {
-+ uint8_t l_i_frag; /* Fragment number */
-+ uint8_t l_i_fsize; /* Fragment size */
-+ uint16_t i_pad1;
-+ uint16_t l_i_uid_high; /* these 2 fields */
-+ uint16_t l_i_gid_high; /* were reserved2[0] */
-+ uint32_t l_i_reserved2;
-+ } linux2;
-+ struct {
-+ uint8_t h_i_frag; /* Fragment number */
-+ uint8_t h_i_fsize; /* Fragment size */
-+ uint16_t h_i_mode_high;
-+ uint16_t h_i_uid_high;
-+ uint16_t h_i_gid_high;
-+ uint32_t h_i_author;
-+ } hurd2;
-+ struct {
-+ uint8_t m_i_frag; /* Fragment number */
-+ uint8_t m_i_fsize; /* Fragment size */
-+ uint16_t m_pad1;
-+ uint32_t m_i_reserved2[2];
-+ } masix2;
-+ } osd2; /* OS dependent 2 */
-+};
-+
-+/*
-+ * Permanent part of an large inode on the disk
-+ */
-+struct ext2_inode_large {
-+ uint16_t i_mode; /* File mode */
-+ uint16_t i_uid; /* Low 16 bits of Owner Uid */
-+ uint32_t i_size; /* Size in bytes */
-+ uint32_t i_atime; /* Access time */
-+ uint32_t i_ctime; /* Creation time */
-+ uint32_t i_mtime; /* Modification time */
-+ uint32_t i_dtime; /* Deletion Time */
-+ uint16_t i_gid; /* Low 16 bits of Group Id */
-+ uint16_t i_links_count; /* Links count */
-+ uint32_t i_blocks; /* Blocks count */
-+ uint32_t i_flags; /* File flags */
-+ union {
-+ struct {
-+ uint32_t l_i_reserved1;
-+ } linux1;
-+ struct {
-+ uint32_t h_i_translator;
-+ } hurd1;
-+ struct {
-+ uint32_t m_i_reserved1;
-+ } masix1;
-+ } osd1; /* OS dependent 1 */
-+ uint32_t i_block[EXT2_N_BLOCKS];/* Pointers to blocks */
-+ uint32_t i_generation; /* File version (for NFS) */
-+ uint32_t i_file_acl; /* File ACL */
-+ uint32_t i_dir_acl; /* Directory ACL */
-+ uint32_t i_faddr; /* Fragment address */
-+ union {
-+ struct {
-+ uint8_t l_i_frag; /* Fragment number */
-+ uint8_t l_i_fsize; /* Fragment size */
-+ uint16_t i_pad1;
-+ uint16_t l_i_uid_high; /* these 2 fields */
-+ uint16_t l_i_gid_high; /* were reserved2[0] */
-+ uint32_t l_i_reserved2;
-+ } linux2;
-+ struct {
-+ uint8_t h_i_frag; /* Fragment number */
-+ uint8_t h_i_fsize; /* Fragment size */
-+ uint16_t h_i_mode_high;
-+ uint16_t h_i_uid_high;
-+ uint16_t h_i_gid_high;
-+ uint32_t h_i_author;
-+ } hurd2;
-+ struct {
-+ uint8_t m_i_frag; /* Fragment number */
-+ uint8_t m_i_fsize; /* Fragment size */
-+ uint16_t m_pad1;
-+ uint32_t m_i_reserved2[2];
-+ } masix2;
-+ } osd2; /* OS dependent 2 */
-+ uint16_t i_extra_isize;
-+ uint16_t i_pad1;
-+};
-+
-+#define i_size_high i_dir_acl
-+
-+/*
-+ * File system states
-+ */
-+#define EXT2_VALID_FS 0x0001 /* Unmounted cleanly */
-+#define EXT2_ERROR_FS 0x0002 /* Errors detected */
-+
-+/*
-+ * Mount flags
-+ */
-+#define EXT2_MOUNT_CHECK 0x0001 /* Do mount-time checks */
-+#define EXT2_MOUNT_GRPID 0x0004 /* Create files with directory's group */
-+#define EXT2_MOUNT_DEBUG 0x0008 /* Some debugging messages */
-+#define EXT2_MOUNT_ERRORS_CONT 0x0010 /* Continue on errors */
-+#define EXT2_MOUNT_ERRORS_RO 0x0020 /* Remount fs ro on errors */
-+#define EXT2_MOUNT_ERRORS_PANIC 0x0040 /* Panic on errors */
-+#define EXT2_MOUNT_MINIX_DF 0x0080 /* Mimics the Minix statfs */
-+#define EXT2_MOUNT_NO_UID32 0x0200 /* Disable 32-bit UIDs */
-+
-+#define clear_opt(o, opt) o &= ~EXT2_MOUNT_##opt
-+#define set_opt(o, opt) o |= EXT2_MOUNT_##opt
-+#define test_opt(sb, opt) (EXT2_SB(sb)->s_mount_opt & \
-+ EXT2_MOUNT_##opt)
-+/*
-+ * Maximal mount counts between two filesystem checks
-+ */
-+#define EXT2_DFL_MAX_MNT_COUNT 20 /* Allow 20 mounts */
-+#define EXT2_DFL_CHECKINTERVAL 0 /* Don't use interval check */
-+
-+/*
-+ * Behaviour when detecting errors
-+ */
-+#define EXT2_ERRORS_CONTINUE 1 /* Continue execution */
-+#define EXT2_ERRORS_RO 2 /* Remount fs read-only */
-+#define EXT2_ERRORS_PANIC 3 /* Panic */
-+#define EXT2_ERRORS_DEFAULT EXT2_ERRORS_CONTINUE
-+
-+/*
-+ * Structure of the super block
-+ */
-+struct ext2_super_block {
-+ uint32_t s_inodes_count; /* Inodes count */
-+ uint32_t s_blocks_count; /* Blocks count */
-+ uint32_t s_r_blocks_count; /* Reserved blocks count */
-+ uint32_t s_free_blocks_count; /* Free blocks count */
-+ uint32_t s_free_inodes_count; /* Free inodes count */
-+ uint32_t s_first_data_block; /* First Data Block */
-+ uint32_t s_log_block_size; /* Block size */
-+ int32_t s_log_frag_size; /* Fragment size */
-+ uint32_t s_blocks_per_group; /* # Blocks per group */
-+ uint32_t s_frags_per_group; /* # Fragments per group */
-+ uint32_t s_inodes_per_group; /* # Inodes per group */
-+ uint32_t s_mtime; /* Mount time */
-+ uint32_t s_wtime; /* Write time */
-+ uint16_t s_mnt_count; /* Mount count */
-+ int16_t s_max_mnt_count; /* Maximal mount count */
-+ uint16_t s_magic; /* Magic signature */
-+ uint16_t s_state; /* File system state */
-+ uint16_t s_errors; /* Behaviour when detecting errors */
-+ uint16_t s_minor_rev_level; /* minor revision level */
-+ uint32_t s_lastcheck; /* time of last check */
-+ uint32_t s_checkinterval; /* max. time between checks */
-+ uint32_t s_creator_os; /* OS */
-+ uint32_t s_rev_level; /* Revision level */
-+ uint16_t s_def_resuid; /* Default uid for reserved blocks */
-+ uint16_t s_def_resgid; /* Default gid for reserved blocks */
-+ /*
-+ * These fields are for EXT2_DYNAMIC_REV superblocks only.
-+ *
-+ * Note: the difference between the compatible feature set and
-+ * the incompatible feature set is that if there is a bit set
-+ * in the incompatible feature set that the kernel doesn't
-+ * know about, it should refuse to mount the filesystem.
-+ *
-+ * e2fsck's requirements are more strict; if it doesn't know
-+ * about a feature in either the compatible or incompatible
-+ * feature set, it must abort and not try to meddle with
-+ * things it doesn't understand...
-+ */
-+ uint32_t s_first_ino; /* First non-reserved inode */
-+ uint16_t s_inode_size; /* size of inode structure */
-+ uint16_t s_block_group_nr; /* block group # of this superblock */
-+ uint32_t s_feature_compat; /* compatible feature set */
-+ uint32_t s_feature_incompat; /* incompatible feature set */
-+ uint32_t s_feature_ro_compat; /* readonly-compatible feature set */
-+ uint8_t s_uuid[16]; /* 128-bit uuid for volume */
-+ char s_volume_name[16]; /* volume name */
-+ char s_last_mounted[64]; /* directory where last mounted */
-+ uint32_t s_algorithm_usage_bitmap; /* For compression */
-+ /*
-+ * Performance hints. Directory preallocation should only
-+ * happen if the EXT2_FEATURE_COMPAT_DIR_PREALLOC flag is on.
-+ */
-+ uint8_t s_prealloc_blocks; /* Nr of blocks to try to preallocate*/
-+ uint8_t s_prealloc_dir_blocks; /* Nr to preallocate for dirs */
-+ uint16_t s_reserved_gdt_blocks; /* Per group table for online growth */
-+ /*
-+ * Journaling support valid if EXT2_FEATURE_COMPAT_HAS_JOURNAL set.
-+ */
-+/*D0*/ uint8_t s_journal_uuid[16]; /* uuid of journal superblock */
-+/*E0*/ uint32_t s_journal_inum; /* inode number of journal file */
-+ uint32_t s_journal_dev; /* device number of journal file */
-+ uint32_t s_last_orphan; /* start of list of inodes to delete */
-+ uint32_t s_hash_seed[4]; /* HTREE hash seed */
-+ uint8_t s_def_hash_version; /* Default hash version to use */
-+ uint8_t s_jnl_backup_type; /* Default type of journal backup */
-+ uint16_t s_reserved_word_pad;
-+/*100*/ uint32_t s_default_mount_opts;
-+ uint32_t s_first_meta_bg; /* First metablock group */
-+ /* ext3 additions */
-+ uint32_t s_mkfs_time; /* When the filesystem was created */
-+ uint32_t s_jnl_blocks[17]; /* Backup of the journal inode */
-+ /* 64bit support valid if EXT4_FEATURE_COMPAT_64BIT */
-+/*150*/ uint32_t s_blocks_count_hi; /* Blocks count */
-+ uint32_t s_r_blocks_count_hi; /* Reserved blocks count */
-+ uint32_t s_free_blocks_count_hi; /* Free blocks count */
-+ uint16_t s_min_extra_isize; /* All inodes have at least # bytes */
-+ uint16_t s_want_extra_isize; /* New inodes should reserve # bytes */
-+ uint32_t s_flags; /* Miscellaneous flags */
-+ uint16_t s_raid_stride; /* RAID stride */
-+ uint16_t s_mmp_interval; /* # seconds to wait in MMP checking */
-+ uint64_t s_mmp_block; /* Block for multi-mount protection */
-+ uint32_t s_raid_stripe_width; /* blocks on all data disks (N*stride)*/
-+ uint8_t s_log_groups_per_flex; /* FLEX_BG group size */
-+ uint8_t s_reserved_char_pad2;
-+ uint16_t s_reserved_pad;
-+ uint32_t s_reserved[162]; /* Padding to the end of the block */
-+};
-+struct BUG_ext2_super_block {
-+ char bug[sizeof(struct ext2_super_block) == 1024 ? 1 : -1];
-+};
-+
-+/*
-+ * Codes for operating systems
-+ */
-+#define EXT2_OS_LINUX 0
-+#define EXT2_OS_HURD 1
-+#define EXT2_OS_MASIX 2
-+#define EXT2_OS_FREEBSD 3
-+#define EXT2_OS_LITES 4
-+
-+/*
-+ * Revision levels
-+ */
-+#define EXT2_GOOD_OLD_REV 0 /* The good old (original) format */
-+#define EXT2_DYNAMIC_REV 1 /* V2 format w/ dynamic inode sizes */
-+
-+#define EXT2_CURRENT_REV EXT2_GOOD_OLD_REV
-+#define EXT2_MAX_SUPP_REV EXT2_DYNAMIC_REV
-+
-+#define EXT2_GOOD_OLD_INODE_SIZE 128
-+
-+/*
-+ * Journal inode backup types
-+ */
-+#define EXT3_JNL_BACKUP_BLOCKS 1
-+
-+/*
-+ * Feature set definitions
-+ */
-+
-+#define EXT2_HAS_COMPAT_FEATURE(sb,mask) \
-+ ( EXT2_SB(sb)->s_feature_compat & (mask) )
-+#define EXT2_HAS_RO_COMPAT_FEATURE(sb,mask) \
-+ ( EXT2_SB(sb)->s_feature_ro_compat & (mask) )
-+#define EXT2_HAS_INCOMPAT_FEATURE(sb,mask) \
-+ ( EXT2_SB(sb)->s_feature_incompat & (mask) )
-+
-+/* for s_feature_compat */
-+#define EXT2_FEATURE_COMPAT_DIR_PREALLOC 0x0001
-+#define EXT2_FEATURE_COMPAT_IMAGIC_INODES 0x0002
-+#define EXT3_FEATURE_COMPAT_HAS_JOURNAL 0x0004
-+#define EXT2_FEATURE_COMPAT_EXT_ATTR 0x0008
-+#define EXT2_FEATURE_COMPAT_RESIZE_INO 0x0010
-+#define EXT2_FEATURE_COMPAT_DIR_INDEX 0x0020
-+
-+/* for s_feature_ro_compat */
-+#define EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER 0x0001
-+#define EXT2_FEATURE_RO_COMPAT_LARGE_FILE 0x0002
-+#define EXT2_FEATURE_RO_COMPAT_BTREE_DIR 0x0004 /* not used */
-+#define EXT4_FEATURE_RO_COMPAT_HUGE_FILE 0x0008
-+#define EXT4_FEATURE_RO_COMPAT_GDT_CSUM 0x0010
-+#define EXT4_FEATURE_RO_COMPAT_DIR_NLINK 0x0020
-+#define EXT4_FEATURE_RO_COMPAT_EXTRA_ISIZE 0x0040
-+
-+/* for s_feature_incompat */
-+#define EXT2_FEATURE_INCOMPAT_COMPRESSION 0x0001
-+#define EXT2_FEATURE_INCOMPAT_FILETYPE 0x0002
-+#define EXT3_FEATURE_INCOMPAT_RECOVER 0x0004
-+#define EXT3_FEATURE_INCOMPAT_JOURNAL_DEV 0x0008
-+#define EXT2_FEATURE_INCOMPAT_META_BG 0x0010
-+#define EXT4_FEATURE_INCOMPAT_EXTENTS 0x0040
-+#define EXT4_FEATURE_INCOMPAT_64BIT 0x0080
-+#define EXT4_FEATURE_INCOMPAT_MMP 0x0100
-+#define EXT4_FEATURE_INCOMPAT_FLEX_BG 0x0200
-+
-+
-+#define EXT2_FEATURE_COMPAT_SUPP 0
-+#define EXT2_FEATURE_RO_COMPAT_SUPP (EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER| \
-+ EXT2_FEATURE_RO_COMPAT_LARGE_FILE| \
-+ EXT2_FEATURE_RO_COMPAT_BTREE_DIR)
-+#define EXT2_FEATURE_INCOMPAT_SUPP (EXT2_FEATURE_INCOMPAT_FILETYPE| \
-+ EXT2_FEATURE_INCOMPAT_META_BG)
-+#define EXT2_FEATURE_INCOMPAT_UNSUPPORTED (~EXT2_FEATURE_INCOMPAT_SUPP)
-+#define EXT2_FEATURE_RO_COMPAT_UNSUPPORTED (~EXT2_FEATURE_RO_COMPAT_SUPP)
-+
-+#define EXT3_FEATURE_RO_COMPAT_SUPP (EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER| \
-+ EXT2_FEATURE_RO_COMPAT_LARGE_FILE| \
-+ EXT2_FEATURE_RO_COMPAT_BTREE_DIR)
-+#define EXT3_FEATURE_INCOMPAT_SUPP (EXT2_FEATURE_INCOMPAT_FILETYPE| \
-+ EXT3_FEATURE_INCOMPAT_RECOVER| \
-+ EXT2_FEATURE_INCOMPAT_META_BG)
-+#define EXT3_FEATURE_INCOMPAT_UNSUPPORTED (~EXT3_FEATURE_INCOMPAT_SUPP)
-+#define EXT3_FEATURE_RO_COMPAT_UNSUPPORTED (~EXT3_FEATURE_RO_COMPAT_SUPP)
-+
-+
-+/*
-+ * Default values for user and/or group using reserved blocks
-+ */
-+#define EXT2_DEF_RESUID 0
-+#define EXT2_DEF_RESGID 0
-+
-+/*
-+ * Default mount options
-+ */
-+#define EXT2_DEFM_DEBUG 0x0001
-+#define EXT2_DEFM_BSDGROUPS 0x0002
-+#define EXT2_DEFM_XATTR_USER 0x0004
-+#define EXT2_DEFM_ACL 0x0008
-+#define EXT2_DEFM_UID16 0x0010
-+#define EXT3_DEFM_JMODE 0x0060
-+#define EXT3_DEFM_JMODE_DATA 0x0020
-+#define EXT3_DEFM_JMODE_ORDERED 0x0040
-+#define EXT3_DEFM_JMODE_WBACK 0x0060
-+
-+/*
-+ * Structure of a directory entry
-+ */
-+#define EXT2_NAME_LEN 255
-+
-+struct ext2_dir_entry {
-+ uint32_t inode; /* Inode number */
-+ uint16_t rec_len; /* Directory entry length */
-+ uint16_t name_len; /* Name length */
-+ char name[EXT2_NAME_LEN]; /* File name */
-+};
-+
-+/*
-+ * The new version of the directory entry. Since EXT2 structures are
-+ * stored in intel byte order, and the name_len field could never be
-+ * bigger than 255 chars, it's safe to reclaim the extra byte for the
-+ * file_type field.
-+ */
-+struct ext2_dir_entry_2 {
-+ uint32_t inode; /* Inode number */
-+ uint16_t rec_len; /* Directory entry length */
-+ uint8_t name_len; /* Name length */
-+ uint8_t file_type;
-+ char name[EXT2_NAME_LEN]; /* File name */
-+};
-+
-+/*
-+ * Ext2 directory file types. Only the low 3 bits are used. The
-+ * other bits are reserved for now.
-+ */
-+#define EXT2_FT_UNKNOWN 0
-+#define EXT2_FT_REG_FILE 1
-+#define EXT2_FT_DIR 2
-+#define EXT2_FT_CHRDEV 3
-+#define EXT2_FT_BLKDEV 4
-+#define EXT2_FT_FIFO 5
-+#define EXT2_FT_SOCK 6
-+#define EXT2_FT_SYMLINK 7
-+
-+#define EXT2_FT_MAX 8
-+
-+/*
-+ * EXT2_DIR_PAD defines the directory entries boundaries
-+ *
-+ * NOTE: It must be a multiple of 4
-+ */
-+#define EXT2_DIR_PAD 4
-+#define EXT2_DIR_ROUND (EXT2_DIR_PAD - 1)
-+#define EXT2_DIR_REC_LEN(name_len) (((name_len) + 8 + EXT2_DIR_ROUND) & \
-+ ~EXT2_DIR_ROUND)
-+
-+#endif
---- a/testsuite/mount.tests
-+++ b/testsuite/mount.tests
-@@ -36,7 +36,8 @@ testing "mount -o remount,mand" \
- "mount -o loop mount.image1m $testdir "\
- "&& grep -Fc $testdir </proc/mounts "\
- "&& mount -o remount,mand $testdir "\
--"&& grep -F $testdir </proc/mounts | grep -c '[, ]mand[, ]'" \
-+"&& grep -F $testdir </proc/mounts | grep -c '[, ]mand[, ]'"\
-+"|| grep -F $testdir </proc/mounts" \
- "1\n""1\n" \
- "" ""
-
-@@ -83,4 +84,28 @@ b
- "" ""
- SKIP=
-
-+
-+testing "mount RO loop" "\
-+exec 2>&1
-+umount -d mount.dir 2>/dev/null
-+rmdir mount.dir 2>/dev/null
-+mkdir -p mount.dir
-+(
-+cd mount.dir || { echo 'cd error'; exit 1; }
-+mkdir z1 z2 || { echo 'mkdir error'; exit 1; }
-+mount -t tmpfs tmpfs z1 || { echo 'mount tmpfs error'; exit 1; }
-+dd if=/dev/zero of=z1/e2img count=10 bs=1M 2>/dev/null || { echo 'dd error'; exit 1; }
-+mke2fs -F z1/e2img 2>/dev/null >&2 || { echo 'mke2fs error'; exit 1; }
-+mount -r -o loop -t ext2 z1/e2img z2 || { echo 'mount -r -o loop error'; exit 1; }
-+mount -o remount,ro z1 || { echo 'mount -o remount,ro error'; exit 1; }
-+)
-+umount -d mount.dir/z2
-+##losetup -d /dev/loop*
-+umount -d mount.dir/z1
-+rm -rf mount.dir
-+echo DONE
-+" \
-+"DONE\n" "" ""
-+
-+
- exit $FAILCOUNT
---- a/util-linux/mkfs_ext2.c
-+++ b/util-linux/mkfs_ext2.c
-@@ -48,16 +48,11 @@
-
- #include "libbb.h"
- #include <linux/fs.h>
--#include <linux/ext2_fs.h>
-+#include "bb_e2fs_defs.h"
-
- #define ENABLE_FEATURE_MKFS_EXT2_RESERVED_GDT 0
- #define ENABLE_FEATURE_MKFS_EXT2_DIR_INDEX 1
-
--// from e2fsprogs
--#define s_reserved_gdt_blocks s_padding1
--#define s_mkfs_time s_reserved[0]
--#define s_flags s_reserved[22]
--
- #define EXT2_HASH_HALF_MD4 1
- #define EXT2_FLAGS_SIGNED_HASH 0x0001
- #define EXT2_FLAGS_UNSIGNED_HASH 0x0002
-@@ -482,8 +477,10 @@ int mkfs_ext2_main(int argc UNUSED_PARAM
- STORE_LE(sb->s_magic, EXT2_SUPER_MAGIC);
- STORE_LE(sb->s_inode_size, inodesize);
- // set "Required extra isize" and "Desired extra isize" fields to 28
-- if (inodesize != sizeof(*inode))
-- STORE_LE(sb->s_reserved[21], 0x001C001C);
-+ if (inodesize != sizeof(*inode)) {
-+ STORE_LE(sb->s_min_extra_isize, 0x001c);
-+ STORE_LE(sb->s_want_extra_isize, 0x001c);
-+ }
- STORE_LE(sb->s_first_ino, EXT2_GOOD_OLD_FIRST_INO);
- STORE_LE(sb->s_log_block_size, blocksize_log2 - EXT2_MIN_BLOCK_LOG_SIZE);
- STORE_LE(sb->s_log_frag_size, blocksize_log2 - EXT2_MIN_BLOCK_LOG_SIZE);
---- a/util-linux/volume_id/ext.c
-+++ b/util-linux/volume_id/ext.c
-@@ -19,28 +19,8 @@
- */
-
- #include "volume_id_internal.h"
-+#include "bb_e2fs_defs.h"
-
--struct ext2_super_block {
-- uint32_t inodes_count;
-- uint32_t blocks_count;
-- uint32_t r_blocks_count;
-- uint32_t free_blocks_count;
-- uint32_t free_inodes_count;
-- uint32_t first_data_block;
-- uint32_t log_block_size;
-- uint32_t dummy3[7];
-- uint8_t magic[2];
-- uint16_t state;
-- uint32_t dummy5[8];
-- uint32_t feature_compat;
-- uint32_t feature_incompat;
-- uint32_t feature_ro_compat;
-- uint8_t uuid[16];
-- uint8_t volume_name[16];
--} PACKED;
--
--#define EXT3_FEATURE_COMPAT_HAS_JOURNAL 0x00000004
--#define EXT3_FEATURE_INCOMPAT_JOURNAL_DEV 0x00000008
- #define EXT_SUPERBLOCK_OFFSET 0x400
-
- int FAST_FUNC volume_id_probe_ext(struct volume_id *id /*,uint64_t off*/)
-@@ -54,23 +34,27 @@ int FAST_FUNC volume_id_probe_ext(struct
- if (es == NULL)
- return -1;
-
-- if (es->magic[0] != 0123 || es->magic[1] != 0357) {
-+ if (es->s_magic != cpu_to_le16(EXT2_SUPER_MAGIC)) {
- dbg("ext: no magic found");
- return -1;
- }
-
- // volume_id_set_usage(id, VOLUME_ID_FILESYSTEM);
- // volume_id_set_label_raw(id, es->volume_name, 16);
-- volume_id_set_label_string(id, es->volume_name, 16);
-- volume_id_set_uuid(id, es->uuid, UUID_DCE);
-+ volume_id_set_label_string(id, (void*)es->s_volume_name, 16);
-+ volume_id_set_uuid(id, es->s_uuid, UUID_DCE);
- dbg("ext: label '%s' uuid '%s'", id->label, id->uuid);
-
- #if ENABLE_FEATURE_BLKID_TYPE
-- if ((le32_to_cpu(es->feature_compat) & EXT3_FEATURE_COMPAT_HAS_JOURNAL) != 0)
-+ if ((es->s_feature_ro_compat & cpu_to_le32(EXT4_FEATURE_RO_COMPAT_HUGE_FILE | EXT4_FEATURE_RO_COMPAT_DIR_NLINK))
-+ || (es->s_feature_incompat & cpu_to_le32(EXT4_FEATURE_INCOMPAT_EXTENTS | EXT4_FEATURE_INCOMPAT_64BIT))
-+ ) {
-+ id->type = "ext4";
-+ }
-+ else if (es->s_feature_compat & cpu_to_le32(EXT3_FEATURE_COMPAT_HAS_JOURNAL))
- id->type = "ext3";
- else
- id->type = "ext2";
- #endif
--
- return 0;
- }
diff --git a/package/utils/busybox/patches/008-backport-dd-conv-swab.patch b/package/utils/busybox/patches/008-backport-dd-conv-swab.patch
deleted file mode 100644
index 1e3cd15..0000000
--- a/package/utils/busybox/patches/008-backport-dd-conv-swab.patch
+++ /dev/null
@@ -1,97 +0,0 @@
---- a/coreutils/dd.c
-+++ b/coreutils/dd.c
-@@ -10,7 +10,7 @@
-
- //usage:#define dd_trivial_usage
- //usage: "[if=FILE] [of=FILE] " IF_FEATURE_DD_IBS_OBS("[ibs=N] [obs=N] ") "[bs=N] [count=N] [skip=N]\n"
--//usage: " [seek=N]" IF_FEATURE_DD_IBS_OBS(" [conv=notrunc|noerror|sync|fsync]")
-+//usage: " [seek=N]" IF_FEATURE_DD_IBS_OBS(" [conv=notrunc|noerror|sync|fsync|swab]")
- //usage:#define dd_full_usage "\n\n"
- //usage: "Copy a file with converting and formatting\n"
- //usage: "\n if=FILE Read from FILE instead of stdin"
-@@ -30,6 +30,7 @@
- //usage: "\n conv=noerror Continue after read errors"
- //usage: "\n conv=sync Pad blocks with zeros"
- //usage: "\n conv=fsync Physically write data out before finishing"
-+//usage: "\n conv=swab Swap every pair of bytes"
- //usage: )
- //usage: "\n"
- //usage: "\nNumbers may be suffixed by c (x1), w (x2), b (x512), kD (x1000), k (x1024),"
-@@ -155,9 +156,10 @@ int dd_main(int argc UNUSED_PARAM, char
- FLAG_SYNC = 1 << 1,
- FLAG_NOERROR = 1 << 2,
- FLAG_FSYNC = 1 << 3,
-+ FLAG_SWAB = 1 << 4,
- /* end of conv flags */
-- FLAG_TWOBUFS = 1 << 4,
-- FLAG_COUNT = 1 << 5,
-+ FLAG_TWOBUFS = 1 << 5,
-+ FLAG_COUNT = 1 << 6,
- };
- static const char keywords[] ALIGN1 =
- "bs\0""count\0""seek\0""skip\0""if\0""of\0"
-@@ -167,7 +169,7 @@ int dd_main(int argc UNUSED_PARAM, char
- ;
- #if ENABLE_FEATURE_DD_IBS_OBS
- static const char conv_words[] ALIGN1 =
-- "notrunc\0""sync\0""noerror\0""fsync\0";
-+ "notrunc\0""sync\0""noerror\0""fsync\0""swab\0";
- #endif
- enum {
- OP_bs = 0,
-@@ -185,11 +187,11 @@ int dd_main(int argc UNUSED_PARAM, char
- OP_conv_sync,
- OP_conv_noerror,
- OP_conv_fsync,
-+ OP_conv_swab,
- /* Unimplemented conv=XXX: */
- //nocreat do not create the output file
- //excl fail if the output file already exists
- //fdatasync physically write output file data before finishing
-- //swab swap every pair of input bytes
- //lcase change upper case to lower case
- //ucase change lower case to upper case
- //block pad newline-terminated records with spaces to cbs-size
-@@ -207,12 +209,14 @@ int dd_main(int argc UNUSED_PARAM, char
- struct {
- int flags;
- size_t oc;
-+ ssize_t prev_read_size; /* for detecting swab failure */
- off_t count;
- off_t seek, skip;
- const char *infile, *outfile;
- } Z;
- #define flags (Z.flags )
- #define oc (Z.oc )
-+#define prev_read_size (Z.prev_read_size)
- #define count (Z.count )
- #define seek (Z.seek )
- #define skip (Z.skip )
-@@ -375,6 +379,27 @@ int dd_main(int argc UNUSED_PARAM, char
- * conv=noerror just ignores input bad blocks */
- n = 0;
- }
-+ if (flags & FLAG_SWAB) {
-+ uint16_t *p16;
-+ ssize_t n2;
-+
-+ /* Our code allows only last read to be odd-sized */
-+ if (prev_read_size & 1)
-+ bb_error_msg_and_die("can't swab %lu byte buffer",
-+ (unsigned long)prev_read_size);
-+ prev_read_size = n;
-+
-+ /* If n is odd, last byte is not swapped:
-+ * echo -n "qwe" | dd conv=swab
-+ * prints "wqe".
-+ */
-+ p16 = (void*) ibuf;
-+ n2 = (n >> 1);
-+ while (--n2 >= 0) {
-+ *p16 = bswap_16(*p16);
-+ p16++;
-+ }
-+ }
- if ((size_t)n == ibs)
- G.in_full++;
- else {
diff --git a/package/utils/busybox/patches/140-trylink_bash.patch b/package/utils/busybox/patches/100-trylink_bash.patch
index f9571fc..f9571fc 100644
--- a/package/utils/busybox/patches/140-trylink_bash.patch
+++ b/package/utils/busybox/patches/100-trylink_bash.patch
diff --git a/package/utils/busybox/patches/141-gen_build_files_bash.patch b/package/utils/busybox/patches/101-gen_build_files_bash.patch
index d258fb8..d258fb8 100644
--- a/package/utils/busybox/patches/141-gen_build_files_bash.patch
+++ b/package/utils/busybox/patches/101-gen_build_files_bash.patch
diff --git a/package/utils/busybox/patches/150-no_static_libgcc.patch b/package/utils/busybox/patches/110-no_static_libgcc.patch
index fde6fbb..2148a09 100644
--- a/package/utils/busybox/patches/150-no_static_libgcc.patch
+++ b/package/utils/busybox/patches/110-no_static_libgcc.patch
@@ -1,11 +1,11 @@
--- a/Makefile.flags
+++ b/Makefile.flags
-@@ -50,7 +50,7 @@ CFLAGS += $(call cc-option,-fno-builtin-
+@@ -51,7 +51,7 @@ CFLAGS += $(call cc-option,-fno-builtin-
# -fno-guess-branch-probability: prohibit pseudo-random guessing
# of branch probabilities (hopefully makes bloatcheck more stable):
CFLAGS += $(call cc-option,-fno-guess-branch-probability,)
-CFLAGS += $(call cc-option,-funsigned-char -static-libgcc,)
+CFLAGS += $(call cc-option,-funsigned-char,)
CFLAGS += $(call cc-option,-falign-functions=1 -falign-jumps=1 -falign-labels=1 -falign-loops=1,)
-
- # FIXME: These warnings are at least partially to be concerned about and should
+ # Defeat .eh_frame bloat (gcc 4.6.3 x86-32 defconfig: 20% smaller busybox binary):
+ CFLAGS += $(call cc-option,-fno-unwind-tables,)
diff --git a/package/utils/busybox/patches/110-wget_getopt_fix.patch b/package/utils/busybox/patches/110-wget_getopt_fix.patch
deleted file mode 100644
index 1003231..0000000
--- a/package/utils/busybox/patches/110-wget_getopt_fix.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/networking/wget.c
-+++ b/networking/wget.c
-@@ -873,7 +873,7 @@ int wget_main(int argc UNUSED_PARAM, cha
- /* Ignored: */
- // "tries\0" Required_argument "t"
- /* Ignored (we always use PASV): */
-- "passive-ftp\0" No_argument "\xff"
-+ "passive-ftp\0" No_argument "\xfd"
- "header\0" Required_argument "\xfe"
- "post-data\0" Required_argument "\xfd"
- /* Ignored (we don't do ssl) */
diff --git a/package/utils/busybox/patches/490-mount_disable_check.patch b/package/utils/busybox/patches/120-remove_uclibc_rpc_check.patch
index 2fcb7f7..a18b7dc 100644
--- a/package/utils/busybox/patches/490-mount_disable_check.patch
+++ b/package/utils/busybox/patches/120-remove_uclibc_rpc_check.patch
@@ -1,6 +1,6 @@
--- a/util-linux/mount.c
+++ b/util-linux/mount.c
-@@ -128,9 +128,6 @@
+@@ -138,9 +138,6 @@
#if ENABLE_FEATURE_MOUNT_NFS
/* This is just a warning of a common mistake. Possibly this should be a
* uclibc faq entry rather than in busybox... */
diff --git a/package/utils/busybox/patches/920-portability.patch b/package/utils/busybox/patches/130-mconf_missing_sigwinch.patch
index 4e5b9a0..54f878a 100644
--- a/package/utils/busybox/patches/920-portability.patch
+++ b/package/utils/busybox/patches/130-mconf_missing_sigwinch.patch
@@ -1,6 +1,6 @@
--- a/scripts/kconfig/mconf.c
+++ b/scripts/kconfig/mconf.c
-@@ -25,6 +25,10 @@
+@@ -27,6 +27,10 @@
#include <unistd.h>
#include <locale.h>
diff --git a/package/utils/busybox/patches/242-udhcpc_msgs.patch b/package/utils/busybox/patches/200-udhcpc_reduce_msgs.patch
index c1c6096..f3470fd 100644
--- a/package/utils/busybox/patches/242-udhcpc_msgs.patch
+++ b/package/utils/busybox/patches/200-udhcpc_reduce_msgs.patch
@@ -1,6 +1,6 @@
--- a/networking/udhcp/dhcpc.c
+++ b/networking/udhcp/dhcpc.c
-@@ -602,6 +602,7 @@ static int raw_bcast_from_client_config_
+@@ -681,6 +681,7 @@ static int bcast_or_ucast(struct dhcp_pa
static NOINLINE int send_discover(uint32_t xid, uint32_t requested)
{
struct dhcp_packet packet;
@@ -8,7 +8,7 @@
/* Fill in: op, htype, hlen, cookie, chaddr fields,
* random xid field (we override it below),
-@@ -619,6 +620,7 @@ static NOINLINE int send_discover(uint32
+@@ -698,6 +699,7 @@ static NOINLINE int send_discover(uint32
*/
add_client_options(&packet);
diff --git a/package/utils/busybox/patches/243-udhcpc_changed_ifindex.patch b/package/utils/busybox/patches/201-udhcpc_changed_ifindex.patch
index cb0df22..3e4e049 100644
--- a/package/utils/busybox/patches/243-udhcpc_changed_ifindex.patch
+++ b/package/utils/busybox/patches/201-udhcpc_changed_ifindex.patch
@@ -1,6 +1,6 @@
--- a/networking/udhcp/dhcpc.c
+++ b/networking/udhcp/dhcpc.c
-@@ -1267,6 +1267,12 @@ int udhcpc_main(int argc UNUSED_PARAM, c
+@@ -1400,6 +1400,12 @@ int udhcpc_main(int argc UNUSED_PARAM, c
/* silence "uninitialized!" warning */
unsigned timestamp_before_wait = timestamp_before_wait;
diff --git a/package/utils/busybox/patches/202-udhcpc_handle_comcast_ip6rd.patch b/package/utils/busybox/patches/202-udhcpc_handle_comcast_ip6rd.patch
new file mode 100644
index 0000000..3c84c20
--- /dev/null
+++ b/package/utils/busybox/patches/202-udhcpc_handle_comcast_ip6rd.patch
@@ -0,0 +1,18 @@
+--- a/networking/udhcp/common.c
++++ b/networking/udhcp/common.c
+@@ -64,6 +64,7 @@ const struct dhcp_optflag dhcp_optflags[
+ #endif
+ { OPTION_STRING , 0xd1 }, /* DHCP_PXE_CONF_FILE */
+ { OPTION_6RD , 0xd4 }, /* DHCP_6RD */
++ { OPTION_6RD , 0x96 }, /* DHCP_6RD (Comcast) */
+ { OPTION_STATIC_ROUTES | OPTION_LIST , 0xf9 }, /* DHCP_MS_STATIC_ROUTES */
+ { OPTION_STRING , 0xfc }, /* DHCP_WPAD */
+
+@@ -131,6 +132,7 @@ const char dhcp_option_strings[] ALIGN1
+ #endif
+ "pxeconffile" "\0" /* DHCP_PXE_CONF_FILE */
+ "ip6rd" "\0" /* DHCP_6RD */
++ "ip6rd" "\0" /* DHCP_6RD (Comcast) */
+ "msstaticroutes""\0"/* DHCP_MS_STATIC_ROUTES */
+ "wpad" "\0" /* DHCP_WPAD */
+ ;
diff --git a/package/utils/busybox/patches/524-udhcpc_renew.patch b/package/utils/busybox/patches/203-udhcpc_renew_no_deconfig.patch
index c22fa52..4bb64b8 100644
--- a/package/utils/busybox/patches/524-udhcpc_renew.patch
+++ b/package/utils/busybox/patches/203-udhcpc_renew_no_deconfig.patch
@@ -1,6 +1,6 @@
--- a/networking/udhcp/dhcpc.c
+++ b/networking/udhcp/dhcpc.c
-@@ -1045,7 +1045,6 @@ static void perform_renew(void)
+@@ -1087,7 +1087,6 @@ static void perform_renew(void)
state = RENEW_REQUESTED;
break;
case RENEW_REQUESTED: /* impatient are we? fine, square 1 */
diff --git a/package/utils/busybox/patches/300-netmsg.patch b/package/utils/busybox/patches/210-add_netmsg_util.patch
index e8b2513..1f6c92e 100644
--- a/package/utils/busybox/patches/300-netmsg.patch
+++ b/package/utils/busybox/patches/210-add_netmsg_util.patch
@@ -1,6 +1,6 @@
--- a/include/applets.src.h
+++ b/include/applets.src.h
-@@ -266,6 +266,7 @@ IF_MT(APPLET(mt, BB_DIR_BIN, BB_SUID_DRO
+@@ -255,6 +255,7 @@ IF_MT(APPLET(mt, BB_DIR_BIN, BB_SUID_DRO
IF_MV(APPLET(mv, BB_DIR_BIN, BB_SUID_DROP))
IF_NAMEIF(APPLET(nameif, BB_DIR_SBIN, BB_SUID_DROP))
IF_NC(APPLET(nc, BB_DIR_USR_BIN, BB_SUID_DROP))
@@ -10,7 +10,7 @@
IF_NOHUP(APPLET(nohup, BB_DIR_USR_BIN, BB_SUID_DROP))
--- a/networking/Config.src
+++ b/networking/Config.src
-@@ -612,6 +612,12 @@ config FEATURE_IPCALC_LONG_OPTIONS
+@@ -620,6 +620,12 @@ config FEATURE_IPCALC_LONG_OPTIONS
help
Support long options for the ipcalc applet.
@@ -96,7 +96,7 @@
+ }
+
+ return 0;
-+
++
+fail:
+ close(s);
+ exit(1);
diff --git a/package/utils/busybox/patches/340-lock_util.patch b/package/utils/busybox/patches/220-add_lock_util.patch
index f23be66..ce663b6 100644
--- a/package/utils/busybox/patches/340-lock_util.patch
+++ b/package/utils/busybox/patches/220-add_lock_util.patch
@@ -1,6 +1,6 @@
--- a/include/applets.src.h
+++ b/include/applets.src.h
-@@ -218,6 +218,7 @@ IF_LN(APPLET_NOEXEC(ln, ln, BB_DIR_BIN,
+@@ -212,6 +212,7 @@ IF_LN(APPLET_NOEXEC(ln, ln, BB_DIR_BIN,
IF_LOAD_POLICY(APPLET(load_policy, BB_DIR_USR_SBIN, BB_SUID_DROP))
IF_LOADFONT(APPLET(loadfont, BB_DIR_USR_SBIN, BB_SUID_DROP))
IF_LOADKMAP(APPLET(loadkmap, BB_DIR_SBIN, BB_SUID_DROP))
diff --git a/package/utils/busybox/patches/610-ntpd_delayed_resolve.patch b/package/utils/busybox/patches/230-ntpd_delayed_resolve.patch
index 5e17ae1..d46a0e3 100644
--- a/package/utils/busybox/patches/610-ntpd_delayed_resolve.patch
+++ b/package/utils/busybox/patches/230-ntpd_delayed_resolve.patch
@@ -1,14 +1,14 @@
--- a/networking/ntpd.c
+++ b/networking/ntpd.c
-@@ -216,6 +216,7 @@ typedef struct {
+@@ -238,6 +238,7 @@ typedef struct {
typedef struct {
len_and_sockaddr *p_lsa;
char *p_dotted;
+ char *p_hostname;
- /* when to send new query (if p_fd == -1)
- * or when receive times out (if p_fd >= 0): */
int p_fd;
-@@ -646,8 +647,9 @@ add_peers(char *s)
+ int datapoint_idx;
+ uint32_t lastpkt_refid;
+@@ -738,8 +739,9 @@ add_peers(char *s)
peer_t *p;
p = xzalloc(sizeof(*p));
@@ -20,7 +20,7 @@
p->p_fd = -1;
p->p_xmt_msg.m_status = MODE_CLIENT | (NTP_VERSION << 3);
p->next_action_time = G.cur_time; /* = set_next(p, 0); */
-@@ -696,6 +698,25 @@ send_query_to_peer(peer_t *p)
+@@ -788,6 +790,25 @@ send_query_to_peer(peer_t *p)
*
* Uncomment this and use strace to see it in action:
*/
diff --git a/package/utils/busybox/patches/902-telnetd_intr.patch b/package/utils/busybox/patches/240-telnetd_intr.patch
index 862ece0..ccb4ea4 100644
--- a/package/utils/busybox/patches/902-telnetd_intr.patch
+++ b/package/utils/busybox/patches/240-telnetd_intr.patch
@@ -1,6 +1,6 @@
--- a/networking/telnetd.c
+++ b/networking/telnetd.c
-@@ -330,6 +330,7 @@ make_new_session(
+@@ -331,6 +331,7 @@ make_new_session(
/* Restore default signal handling ASAP */
bb_signals((1 << SIGCHLD) + (1 << SIGPIPE), SIG_DFL);
diff --git a/package/utils/busybox/patches/240-udhcpc_retries.patch b/package/utils/busybox/patches/240-udhcpc_retries.patch
deleted file mode 100644
index 0e26864..0000000
--- a/package/utils/busybox/patches/240-udhcpc_retries.patch
+++ /dev/null
@@ -1,20 +0,0 @@
---- a/networking/udhcp/dhcpc.c
-+++ b/networking/udhcp/dhcpc.c
-@@ -1319,7 +1319,7 @@ int udhcpc_main(int argc UNUSED_PARAM, c
-
- switch (state) {
- case INIT_SELECTING:
-- if (packet_num < discover_retries) {
-+ if (!discover_retries || packet_num < discover_retries) {
- if (packet_num == 0)
- xid = random_xid();
- /* broadcast */
-@@ -1348,7 +1348,7 @@ int udhcpc_main(int argc UNUSED_PARAM, c
- packet_num = 0;
- continue;
- case REQUESTING:
-- if (packet_num < discover_retries) {
-+ if (!discover_retries || packet_num < discover_retries) {
- /* send broadcast select packet */
- send_select(xid, server_addr, requested_ip);
- timeout = discover_timeout;
diff --git a/package/utils/busybox/patches/244-udhcpc_add_6rd_option.patch b/package/utils/busybox/patches/244-udhcpc_add_6rd_option.patch
deleted file mode 100644
index 2f0eadb..0000000
--- a/package/utils/busybox/patches/244-udhcpc_add_6rd_option.patch
+++ /dev/null
@@ -1,143 +0,0 @@
---- a/networking/udhcp/common.c
-+++ b/networking/udhcp/common.c
-@@ -60,6 +60,8 @@ const struct dhcp_optflag dhcp_optflags[
- { OPTION_U8 , 0x85 }, /* DHCP_VLAN_PRIORITY */
- #endif
- { OPTION_STATIC_ROUTES , 0xf9 }, /* DHCP_MS_STATIC_ROUTES */
-+ { OPTION_6RD , 0xd4 }, /* DHCP_6RD (RFC) */
-+ { OPTION_6RD , 0x96 }, /* DHCP_6RD (Comcast) */
- { OPTION_STRING , 0xfc }, /* DHCP_WPAD */
-
- /* Options below have no match in dhcp_option_strings[],
-@@ -127,6 +129,8 @@ const char dhcp_option_strings[] ALIGN1
- "vlanpriority" "\0"/* DHCP_VLAN_PRIORITY */
- #endif
- "msstaticroutes""\0"/* DHCP_MS_STATIC_ROUTES */
-+ "ip6rd" "\0" /* DHCP_6RD (RFC) */
-+ "ip6rd" "\0" /* DHCP_6RD (Comcast) */
- "wpad" "\0" /* DHCP_WPAD */
- ;
-
-@@ -155,6 +159,7 @@ const uint8_t dhcp_option_lengths[] ALIG
- [OPTION_S32] = 4,
- /* Just like OPTION_STRING, we use minimum length here */
- [OPTION_STATIC_ROUTES] = 5,
-+ [OPTION_6RD] = 22,
- };
-
-
---- a/networking/udhcp/common.h
-+++ b/networking/udhcp/common.h
-@@ -91,6 +91,7 @@ enum {
- OPTION_S32,
- OPTION_BIN,
- OPTION_STATIC_ROUTES,
-+ OPTION_6RD,
- #if ENABLE_FEATURE_UDHCP_RFC3397
- OPTION_DNS_STRING, /* RFC1035 compressed domain name list */
- OPTION_SIP_SERVERS,
---- a/networking/udhcp/dhcpc.c
-+++ b/networking/udhcp/dhcpc.c
-@@ -100,6 +100,7 @@ static const uint8_t len_of_option_as_st
- [OPTION_IP ] = sizeof("255.255.255.255 "),
- [OPTION_IP_PAIR ] = sizeof("255.255.255.255 ") * 2,
- [OPTION_STATIC_ROUTES ] = sizeof("255.255.255.255/32 255.255.255.255 "),
-+ [OPTION_6RD ] = sizeof("32 128 FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF 255.255.255.255 "),
- [OPTION_STRING ] = 1,
- [OPTION_STRING_HOST ] = 1,
- #if ENABLE_FEATURE_UDHCP_RFC3397
-@@ -124,6 +125,23 @@ static int sprint_nip(char *dest, const
- return sprintf(dest, "%s%u.%u.%u.%u", pre, ip[0], ip[1], ip[2], ip[3]);
- }
-
-+static int sprint_nip6(char *dest, const char *pre, const uint8_t *ip)
-+{
-+ int len = 0;
-+ int off;
-+ uint16_t word;
-+
-+ len += sprintf(dest, "%s", pre);
-+
-+ for (off = 0; off < 16; off += 2)
-+ {
-+ move_from_unaligned16(word, &ip[off]);
-+ len += sprintf(dest+len, "%s%04X", off ? ":" : "", htons(word));
-+ }
-+
-+ return len;
-+}
-+
- /* really simple implementation, just count the bits */
- static int mton(uint32_t mask)
- {
-@@ -292,6 +310,70 @@ static NOINLINE char *xmalloc_optname_op
- }
-
- return ret;
-+ }
-+ case OPTION_6RD: {
-+ /* Option binary format:
-+ * 0 1 2 3
-+ * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
-+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-+ * | OPTION_6RD | option-length | IPv4MaskLen | 6rdPrefixLen |
-+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-+ * | |
-+ * | 6rdPrefix |
-+ * | (16 octets) |
-+ * | |
-+ * | |
-+ * | |
-+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-+ * | 6rdBRIPv4Address(es) |
-+ * . .
-+ * . .
-+ * . .
-+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-+ *
-+ * We convert it to a string "IPv4MaskLen 6rdPrefixLen 6rdPrefix 6rdBRIPv4Address"
-+ */
-+
-+ /* Sanity check: ensure that our length is at least 22 bytes, that
-+ * IPv4MaskLen is <= 32, 6rdPrefixLen <= 128 and that the sum of
-+ * (32 - IPv4MaskLen) + 6rdPrefixLen is less than or equal to 128.
-+ * If any of these requirements is not fulfilled, return with empty
-+ * value.
-+ */
-+ if ((len >= 22) && (*option <= 32) && (*(option+1) <= 128) &&
-+ (((32 - *option) + *(option+1)) <= 128))
-+ {
-+ /* IPv4MaskLen */
-+ dest += sprintf(dest, "%u ", *option++);
-+ len--;
-+
-+ /* 6rdPrefixLen */
-+ dest += sprintf(dest, "%u ", *option++);
-+ len--;
-+
-+ /* 6rdPrefix */
-+ dest += sprint_nip6(dest, "", option);
-+ option += 16;
-+ len -= 16;
-+
-+ /* 6rdBRIPv4Addresses */
-+ while (len >= 4)
-+ {
-+ dest += sprint_nip(dest, " ", option);
-+ option += 4;
-+ len -= 4;
-+
-+ /* the code to determine the option size fails to work with
-+ * lengths that are not a multiple of the minimum length,
-+ * adding all advertised 6rdBRIPv4Addresses here would
-+ * overflow the destination buffer, therefore skip the rest
-+ * for now
-+ */
-+ break;
-+ }
-+ }
-+
-+ return ret;
- }
- #if ENABLE_FEATURE_UDHCP_RFC3397
- case OPTION_DNS_STRING:
diff --git a/package/utils/busybox/patches/250-ash_export-n.patch b/package/utils/busybox/patches/250-ash_export-n.patch
deleted file mode 100644
index ddbe74e..0000000
--- a/package/utils/busybox/patches/250-ash_export-n.patch
+++ /dev/null
@@ -1,34 +0,0 @@
---- a/shell/ash.c
-+++ b/shell/ash.c
-@@ -12611,8 +12611,17 @@ exportcmd(int argc UNUSED_PARAM, char **
- const char *p;
- char **aptr;
- int flag = argv[0][0] == 'r' ? VREADONLY : VEXPORT;
-+ int mask = ~0;
-+ int nopt;
-+ while ((nopt = nextopt("np"))) {
-+ if (nopt == 'n') {
-+ mask = ~flag;
-+ } else { /* p */
-+ break;
-+ }
-+ }
-
-- if (nextopt("p") != 'p') {
-+ if (nopt != 'p') {
- aptr = argptr;
- name = *aptr;
- if (name) {
-@@ -12624,10 +12633,11 @@ exportcmd(int argc UNUSED_PARAM, char **
- vp = *findvar(hashvar(name), name);
- if (vp) {
- vp->flags |= flag;
-+ vp->flags &= mask;
- continue;
- }
- }
-- setvar(name, p, flag);
-+ setvar(name, p, flag & mask);
- } while ((name = *++aptr) != NULL);
- return 0;
- }
diff --git a/package/utils/busybox/patches/911-date-k-flag.patch b/package/utils/busybox/patches/250-date-k-flag.patch
index c55ee23..d17d61f 100644
--- a/package/utils/busybox/patches/911-date-k-flag.patch
+++ b/package/utils/busybox/patches/250-date-k-flag.patch
@@ -8,7 +8,7 @@
//usage: "\n"
//usage: "\nRecognized TIME formats:"
//usage: "\n hh:mm[:ss]"
-@@ -135,6 +136,7 @@
+@@ -138,6 +139,7 @@
//usage: "Wed Apr 12 18:52:41 MDT 2000\n"
#include "libbb.h"
@@ -16,7 +16,7 @@
#if ENABLE_FEATURE_DATE_NANO
# include <sys/syscall.h>
#endif
-@@ -145,8 +147,9 @@ enum {
+@@ -148,8 +150,9 @@ enum {
OPT_UTC = (1 << 2), /* u */
OPT_DATE = (1 << 3), /* d */
OPT_REFERENCE = (1 << 4), /* r */
@@ -28,7 +28,7 @@
};
static void maybe_set_utc(int opt)
-@@ -164,12 +167,15 @@ static const char date_longopts[] ALIGN1
+@@ -167,12 +170,15 @@ static const char date_longopts[] ALIGN1
/* "universal\0" No_argument "u" */
"date\0" Required_argument "d"
"reference\0" Required_argument "r"
@@ -44,7 +44,7 @@
struct timespec ts;
struct tm tm_time;
char buf_fmt_dt2str[64];
-@@ -184,7 +190,7 @@ int date_main(int argc UNUSED_PARAM, cha
+@@ -187,7 +193,7 @@ int date_main(int argc UNUSED_PARAM, cha
opt_complementary = "d--s:s--d"
IF_FEATURE_DATE_ISOFMT(":R--I:I--R");
IF_LONG_OPTS(applet_long_options = date_longopts;)
@@ -53,7 +53,7 @@
IF_FEATURE_DATE_ISOFMT("I::D:"),
&date_str, &date_str, &filename
IF_FEATURE_DATE_ISOFMT(, &isofmt_arg, &fmt_str2dt));
-@@ -241,6 +247,31 @@ int date_main(int argc UNUSED_PARAM, cha
+@@ -244,6 +250,31 @@ int date_main(int argc UNUSED_PARAM, cha
if (*argv)
bb_show_usage();
diff --git a/package/utils/busybox/patches/251-ash_fix-redir-substitution.patch b/package/utils/busybox/patches/251-ash_fix-redir-substitution.patch
deleted file mode 100644
index cb2ae94..0000000
--- a/package/utils/busybox/patches/251-ash_fix-redir-substitution.patch
+++ /dev/null
@@ -1,12 +0,0 @@
---- a/shell/ash.c
-+++ b/shell/ash.c
-@@ -6846,8 +6846,7 @@ evalvar(char *p, int flags, struct strli
- patloc = expdest - (char *)stackblock();
- if (NULL == subevalvar(p, /* varname: */ NULL, patloc, subtype,
- startloc, varflags,
--//TODO: | EXP_REDIR too? All other such places do it too
-- /* quotes: */ flags & (EXP_FULL | EXP_CASE),
-+ /* quotes: */ flags & (EXP_FULL | EXP_CASE | EXP_REDIR),
- var_str_list)
- ) {
- int amount = expdest - (
diff --git a/package/utils/busybox/patches/998-arping_missing_includes.patch b/package/utils/busybox/patches/260-arping_missing_includes.patch
index a9d4a62..a9d4a62 100644
--- a/package/utils/busybox/patches/998-arping_missing_includes.patch
+++ b/package/utils/busybox/patches/260-arping_missing_includes.patch
diff --git a/package/utils/busybox/patches/260-vconfig_proc.patch b/package/utils/busybox/patches/260-vconfig_proc.patch
deleted file mode 100644
index 7ac52ab..0000000
--- a/package/utils/busybox/patches/260-vconfig_proc.patch
+++ /dev/null
@@ -1,22 +0,0 @@
---- a/networking/vconfig.c
-+++ b/networking/vconfig.c
-@@ -116,8 +116,6 @@ static const char name_types[] ALIGN1 =
- '_', 'N', 'O', '_', 'P', 'A', 'D', 0,
- };
-
--static const char conf_file_name[] ALIGN1 = "/proc/net/vlan/config";
--
- int vconfig_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
- int vconfig_main(int argc, char **argv)
- {
-@@ -129,10 +127,6 @@ int vconfig_main(int argc, char **argv)
- bb_show_usage();
- }
-
-- /* Don't bother closing the filedes. It will be closed on cleanup. */
-- /* Will die if 802.1q is not present */
-- xopen(conf_file_name, O_RDONLY);
--
- memset(&ifr, 0, sizeof(ifr));
-
- ++argv;
diff --git a/package/utils/busybox/patches/611-upstream_ntpd_version_fix.patch b/package/utils/busybox/patches/611-upstream_ntpd_version_fix.patch
deleted file mode 100644
index 7bcb847..0000000
--- a/package/utils/busybox/patches/611-upstream_ntpd_version_fix.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From b7841cf7b919b16d1bd4619154bf7cb4c22b4ccd Mon Sep 17 00:00:00 2001
-From: Paul Marks <paul@pmarks.net>
-Date: Mon, 14 Jan 2013 01:39:10 +0000
-Subject: ntpd: fix incorrect m_status field in outgoing packets. Closes 5120
-
-When using busybox ntpd with an NTPv3 client and NTPv4 server (or vice
-versa), the version numbers can be incorrectly ORed together, yielding
-the bogus value of "NTPv7". This makes ntpd unusable with clients
-such as Chrony and Windows "Internet Time".
-
-This patch avoids the version mangling, by copying only the Leap
-Indicator bits from the server's status field.
-
-Signed-off-by: Paul Marks <paul@pmarks.net>
-Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
----
-(limited to 'networking/ntpd.c')
-
---- a/networking/ntpd.c
-+++ b/networking/ntpd.c
-@@ -1794,7 +1794,7 @@ recv_and_process_client_pkt(void /*int f
-
- /* Build a reply packet */
- memset(&msg, 0, sizeof(msg));
-- msg.m_status = G.stratum < MAXSTRAT ? G.ntp_status : LI_ALARM;
-+ msg.m_status = G.stratum < MAXSTRAT ? (G.ntp_status & LI_MASK) : LI_ALARM;
- msg.m_status |= (query_status & VERSION_MASK);
- msg.m_status |= ((query_status & MODE_MASK) == MODE_CLIENT) ?
- MODE_SERVER : MODE_SYM_PAS;
diff --git a/package/utils/busybox/patches/700-hexdump_segfault_fix.patch b/package/utils/busybox/patches/700-hexdump_segfault_fix.patch
deleted file mode 100644
index ab09fb3..0000000
--- a/package/utils/busybox/patches/700-hexdump_segfault_fix.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/libbb/dump.c
-+++ b/libbb/dump.c
-@@ -301,7 +301,7 @@ static NOINLINE void rewrite(priv_dumper
- ) {
- fu->reps += (dumper->blocksize - fs->bcnt) / fu->bcnt;
- }
-- if (fu->reps > 1) {
-+ if (fu->reps > 1 && fu->nextpr) {
- for (pr = fu->nextpr;; pr = pr->nextpr)
- if (!pr->nextpr)
- break;
diff --git a/package/utils/busybox/patches/950-partial-checksum.patch b/package/utils/busybox/patches/950-partial-checksum.patch
deleted file mode 100644
index 6e8a69e..0000000
--- a/package/utils/busybox/patches/950-partial-checksum.patch
+++ /dev/null
@@ -1,86 +0,0 @@
---- a/networking/udhcp/dhcpc.c
-+++ b/networking/udhcp/dhcpc.c
-@@ -26,8 +26,8 @@
- #include "dhcpc.h"
-
- #include <netinet/if_ether.h>
--#include <netpacket/packet.h>
- #include <linux/filter.h>
-+#include <linux/if_packet.h>
-
- /* struct client_config_t client_config is in bb_common_bufsiz1 */
-
-@@ -846,17 +846,41 @@ static int send_release(uint32_t server,
- static NOINLINE int udhcp_recv_raw_packet(struct dhcp_packet *dhcp_pkt, int fd)
- {
- int bytes;
-+ int nocsum = 0;
- struct ip_udp_dhcp_packet packet;
- uint16_t check;
-+ unsigned char cmsgbuf[CMSG_LEN(sizeof(struct tpacket_auxdata))];
-+ struct iovec iov = {
-+ .iov_base = &packet,
-+ .iov_len = sizeof(packet),
-+ };
-+ struct msghdr msg = {
-+ .msg_iov = &iov,
-+ .msg_iovlen = 1,
-+ .msg_control = cmsgbuf,
-+ .msg_controllen = sizeof(cmsgbuf),
-+ };
-+ struct cmsghdr *cmsg;
-
- memset(&packet, 0, sizeof(packet));
-- bytes = safe_read(fd, &packet, sizeof(packet));
-+ do {
-+ bytes = recvmsg(fd, &msg, 0);
-+ } while (bytes < 0 && errno == EINTR);
-+
- if (bytes < 0) {
- log1("Packet read error, ignoring");
- /* NB: possible down interface, etc. Caller should pause. */
- return bytes; /* returns -1 */
- }
-
-+ for (cmsg = CMSG_FIRSTHDR(&msg); cmsg; cmsg = CMSG_NXTHDR(&msg, cmsg)) {
-+ if (cmsg->cmsg_level == SOL_PACKET &&
-+ cmsg->cmsg_type == PACKET_AUXDATA) {
-+ struct tpacket_auxdata *aux = (void *)CMSG_DATA(cmsg);
-+ nocsum = aux->tp_status & TP_STATUS_CSUMNOTREADY;
-+ }
-+ }
-+
- if (bytes < (int) (sizeof(packet.ip) + sizeof(packet.udp))) {
- log1("Packet is too short, ignoring");
- return -2;
-@@ -896,7 +920,7 @@ static NOINLINE int udhcp_recv_raw_packe
- packet.ip.tot_len = packet.udp.len; /* yes, this is needed */
- check = packet.udp.check;
- packet.udp.check = 0;
-- if (check && check != udhcp_checksum(&packet, bytes)) {
-+ if (!nocsum && check && check != udhcp_checksum(&packet, bytes)) {
- log1("Packet with bad UDP checksum received, ignoring");
- return -2;
- }
-@@ -942,6 +966,7 @@ static int udhcp_raw_socket(int ifindex)
- {
- int fd;
- struct sockaddr_ll sock;
-+ int val;
-
- /*
- * Comment:
-@@ -1008,6 +1033,13 @@ static int udhcp_raw_socket(int ifindex)
- log1("Attached filter to raw socket fd %d", fd); // log?
- }
-
-+ val = 1;
-+ if (setsockopt(fd, SOL_PACKET, PACKET_AUXDATA, &val,
-+ sizeof(val)) < 0) {
-+ if (errno != ENOPROTOOPT)
-+ log1("Failed to set auxiliary packet data for socket fd %d", fd);
-+ }
-+
- log1("Created raw socket");
-
- return fd;
diff --git a/package/utils/busybox/patches/999-musl-fixes.patch b/package/utils/busybox/patches/999-musl-fixes.patch
deleted file mode 100644
index b528b3e..0000000
--- a/package/utils/busybox/patches/999-musl-fixes.patch
+++ /dev/null
@@ -1,16 +0,0 @@
---- a/include/platform.h
-+++ b/include/platform.h
-@@ -443,6 +443,13 @@ typedef unsigned smalluint;
- # undef HAVE_NET_ETHERNET_H
- #endif
-
-+#if defined(__musl__)
-+# undef HAVE_SETBIT
-+# include <stddef.h>
-+# include <termios.h>
-+# include <sys/ioctl.h>
-+#endif
-+
- /*
- * Now, define prototypes for all the functions defined in platform.c
- * These must come after all the HAVE_* macros are defined (or not)