Просмотр исходного кода

upgrade busybox to 1.8.1

SVN-Revision: 9524
Felix Fietkau 18 лет назад
Родитель
Сommit
8fba43d0f1

+ 2 - 2
package/busybox/Makefile

@@ -9,13 +9,13 @@
 include $(TOPDIR)/rules.mk
 include $(TOPDIR)/rules.mk
 
 
 PKG_NAME:=busybox
 PKG_NAME:=busybox
-PKG_VERSION:=1.7.2
+PKG_VERSION:=1.8.1
 PKG_RELEASE:=4
 PKG_RELEASE:=4
 
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=http://www.busybox.net/downloads \
 PKG_SOURCE_URL:=http://www.busybox.net/downloads \
 		http://distfiles.gentoo.org/distfiles/
 		http://distfiles.gentoo.org/distfiles/
-PKG_MD5SUM:=c91ec9756e2000073a9dd8fa9fc3f89e
+PKG_MD5SUM:=c54554851d989328654a3eeab915a04f
 
 
 include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/package.mk
 
 

+ 97 - 48
package/busybox/config/Config.in

@@ -185,10 +185,10 @@ config BUSYBOX_CONFIG_FEATURE_SUID_CONFIG
 
 
 	  The file has to be owned by user root, group root and has to be
 	  The file has to be owned by user root, group root and has to be
 	  writeable only by root:
 	  writeable only by root:
-	  	(chown 0.0 /etc/busybox.conf; chmod 600 /etc/busybox.conf)
+	        (chown 0.0 /etc/busybox.conf; chmod 600 /etc/busybox.conf)
 	  The busybox executable has to be owned by user root, group
 	  The busybox executable has to be owned by user root, group
 	  root and has to be setuid root for this to work:
 	  root and has to be setuid root for this to work:
-	  	(chown 0.0 /bin/busybox; chmod 4755 /bin/busybox)
+	        (chown 0.0 /bin/busybox; chmod 4755 /bin/busybox)
 
 
 	  Robert 'sandman' Griebl has more information here:
 	  Robert 'sandman' Griebl has more information here:
 	  <url: http://www.softforge.de/bb/suid.html >.
 	  <url: http://www.softforge.de/bb/suid.html >.
@@ -282,41 +282,80 @@ config BUSYBOX_CONFIG_STATIC
 config BUSYBOX_CONFIG_BUILD_LIBBUSYBOX
 config BUSYBOX_CONFIG_BUILD_LIBBUSYBOX
 	bool "Build shared libbusybox"
 	bool "Build shared libbusybox"
 	default n
 	default n
+	depends on !BUSYBOX_CONFIG_FEATURE_PREFER_APPLETS
+	help
+	  Build a shared library libbusybox.so.N.N.N which contains all
+	  busybox code.
+
+	  This feature allows every applet to be built as a tiny
+	  separate executable.  Enabling it for "one big busybox binary"
+	  approach serves no purpose and increases code size.
+	  You should almost certainly say "no" to this.
+
+### config FEATURE_FULL_LIBBUSYBOX
+###	bool "Feature-complete libbusybox"
+###	default n if !FEATURE_SHARED_BUSYBOX
+###	depends on BUILD_LIBBUSYBOX
+###	help
+###	  Build a libbusybox with the complete feature-set, disregarding
+###	  the actually selected config.
+###
+###	  Normally, libbusybox will only contain the features which are
+###	  used by busybox itself. If you plan to write a separate
+###	  standalone application which uses libbusybox say 'Y'.
+###
+###	  Note: libbusybox is GPL, not LGPL, and exports no stable API that
+###	  might act as a copyright barrier.  We can and will modify the
+###	  exported function set between releases (even minor version number
+###	  changes), and happily break out-of-tree features.
+###
+###	  Say 'N' if in doubt.
+
+config BUSYBOX_CONFIG_FEATURE_INDIVIDUAL
+	bool "Produce a binary for each applet, linked against libbusybox"
+	default n
+	depends on !BUSYBOX_CONFIG_STATIC && BUSYBOX_CONFIG_BUILD_LIBBUSYBOX
 	help
 	help
-	  Build a shared library libbusybox.so which contains all
-	  libraries used inside busybox.
-
-	  This is an experimental feature intended to support the upcoming
-	  "make standalone" mode.  Enabling it against the one big busybox
-	  binary serves no purpose (and increases the size).  You should
-	  almost certainly say "no" to this right now.
-
-config BUSYBOX_CONFIG_FEATURE_FULL_LIBBUSYBOX
-	bool "Feature-complete libbusybox"
-	default n if !BUSYBOX_CONFIG_FEATURE_SHARED_BUSYBOX
-	depends on BUSYBOX_CONFIG_BUILD_LIBBUSYBOX
-	help
-	  Build a libbusybox with the complete feature-set, disregarding
-	  the actually selected config.
+	  If your CPU architecture doesn't allow for sharing text/rodata
+	  sections of running binaries, but allows for runtime dynamic
+	  libraries, this option will allow you to reduce memory footprint
+	  when you have many different applets running at once.
 
 
-	  Normally, libbusybox will only contain the features which are
-	  used by busybox itself. If you plan to write a separate
-	  standalone application which uses libbusybox say 'Y'.
+	  If your CPU architecture allows for sharing text/rodata,
+	  having single binary is more optimal.
 
 
-	  Note: libbusybox is GPL, not LGPL, and exports no stable API that
-	  might act as a copyright barrier.  We can and will modify the
-	  exported function set between releases (even minor version number
-	  changes), and happily break out-of-tree features.
+	  Each applet will be a tiny program, dynamically linked
+	  against libbusybox.so.N.N.N.
 
 
-	  Say 'N' if in doubt.
+	  You need to have a working dynamic linker.
 
 
 config BUSYBOX_CONFIG_FEATURE_SHARED_BUSYBOX
 config BUSYBOX_CONFIG_FEATURE_SHARED_BUSYBOX
-	bool "Use shared libbusybox for busybox"
-	default n if BUSYBOX_CONFIG_BUILD_LIBBUSYBOX
+	bool "Produce additional busybox binary linked against libbusybox"
+	default n
 	depends on !BUSYBOX_CONFIG_STATIC && BUSYBOX_CONFIG_BUILD_LIBBUSYBOX
 	depends on !BUSYBOX_CONFIG_STATIC && BUSYBOX_CONFIG_BUILD_LIBBUSYBOX
 	help
 	help
-	  Use libbusybox.so also for busybox itself.
-	  You need to have a working dynamic linker to use this variant.
+	  Build busybox, dynamically linked against libbusybox.so.N.N.N.
+
+	  You need to have a working dynamic linker.
+
+### config BUILD_AT_ONCE
+###	bool "Compile all sources at once"
+###	default n
+###	help
+###	  Normally each source-file is compiled with one invocation of
+###	  the compiler.
+###	  If you set this option, all sources are compiled at once.
+###	  This gives the compiler more opportunities to optimize which can
+###	  result in smaller and/or faster binaries.
+###
+###	  Setting this option will consume alot of memory, e.g. if you
+###	  enable all applets with all features, gcc uses more than 300MB
+###	  RAM during compilation of busybox.
+###
+###	  This option is most likely only beneficial for newer compilers
+###	  such as gcc-4.1 and above.
+###
+###	  Say 'N' unless you know what you are doing.
 
 
 config BUSYBOX_CONFIG_LFS
 config BUSYBOX_CONFIG_LFS
 	bool
 	bool
@@ -330,25 +369,6 @@ config BUSYBOX_CONFIG_LFS
 	  cp, mount, tar, and many others.  If you want to access files larger
 	  cp, mount, tar, and many others.  If you want to access files larger
 	  than 2 Gigabytes, enable this option.  Otherwise, leave it set to 'N'.
 	  than 2 Gigabytes, enable this option.  Otherwise, leave it set to 'N'.
 
 
-config BUSYBOX_CONFIG_BUILD_AT_ONCE
-	bool "Compile all sources at once"
-	default n
-	help
-	  Normally each source-file is compiled with one invocation of
-	  the compiler.
-	  If you set this option, all sources are compiled at once.
-	  This gives the compiler more opportunities to optimize which can
-	  result in smaller and/or faster binaries.
-
-	  Setting this option will consume alot of memory, e.g. if you
-	  enable all applets with all features, gcc uses more than 300MB
-	  RAM during compilation of busybox.
-
-	  This option is most likely only beneficial for newer compilers
-	  such as gcc-4.1 and above.
-
-	  Say 'N' unless you know what you are doing.
-
 endmenu
 endmenu
 
 
 menu 'Debugging Options'
 menu 'Debugging Options'
@@ -464,6 +484,11 @@ config BUSYBOX_CONFIG_INSTALL_APPLET_HARDLINKS
 	  Install applets as hard-links to the busybox binary. This might count
 	  Install applets as hard-links to the busybox binary. This might count
 	  on a filesystem with few inodes.
 	  on a filesystem with few inodes.
 
 
+config BUSYBOX_CONFIG_INSTALL_APPLET_SCRIPT_WRAPPERS
+	bool "as script wrappers"
+	help
+	  Install applets as script wrappers that call the busybox binary.
+
 config BUSYBOX_CONFIG_INSTALL_APPLET_DONT
 config BUSYBOX_CONFIG_INSTALL_APPLET_DONT
 	bool "not installed"
 	bool "not installed"
 	depends on BUSYBOX_CONFIG_FEATURE_INSTALLER || BUSYBOX_CONFIG_FEATURE_SH_STANDALONE || BUSYBOX_CONFIG_FEATURE_PREFER_APPLETS
 	depends on BUSYBOX_CONFIG_FEATURE_INSTALLER || BUSYBOX_CONFIG_FEATURE_SH_STANDALONE || BUSYBOX_CONFIG_FEATURE_PREFER_APPLETS
@@ -473,6 +498,30 @@ config BUSYBOX_CONFIG_INSTALL_APPLET_DONT
 
 
 endchoice
 endchoice
 
 
+choice
+	prompt "/bin/sh applet link"
+	default BUSYBOX_CONFIG_INSTALL_SH_APPLET_SYMLINK
+	depends on BUSYBOX_CONFIG_INSTALL_APPLET_SCRIPT_WRAPPERS
+	help
+	  Choose how you install /bin/sh applet link.
+
+config BUSYBOX_CONFIG_INSTALL_SH_APPLET_SYMLINK
+	bool "as soft-link"
+	help
+	  Install /bin/sh applet as soft-link to the busybox binary.
+
+config BUSYBOX_CONFIG_INSTALL_SH_APPLET_HARDLINK
+	bool "as hard-link"
+	help
+	  Install /bin/sh applet as hard-link to the busybox binary.
+
+config BUSYBOX_CONFIG_INSTALL_SH_APPLET_SCRIPT_WRAPPER
+	bool "as script wrapper"
+	help
+	  Install /bin/sh applet as script wrapper that call the busybox binary.
+
+endchoice
+
 config BUSYBOX_CONFIG_PREFIX
 config BUSYBOX_CONFIG_PREFIX
 	string "BusyBox installation prefix"
 	string "BusyBox installation prefix"
 	default "./_install"
 	default "./_install"

+ 13 - 3
package/busybox/config/archival/Config.in

@@ -48,12 +48,22 @@ config BUSYBOX_CONFIG_BUNZIP2
 	  conventional LZ77/LZ78-based compressors, and approaches the
 	  conventional LZ77/LZ78-based compressors, and approaches the
 	  performance of the PPM family of statistical compressors.
 	  performance of the PPM family of statistical compressors.
 
 
-	  The BusyBox bunzip2 applet is limited to de-compression only.
-	  On an x86 system, this applet adds about 11K.
-
 	  Unless you have a specific application which requires bunzip2, you
 	  Unless you have a specific application which requires bunzip2, you
 	  should probably say N here.
 	  should probably say N here.
 
 
+config BUSYBOX_CONFIG_BZIP2
+	bool "bzip2"
+	default n
+	help
+	  bzip2 is a compression utility using the Burrows-Wheeler block
+	  sorting text compression algorithm, and Huffman coding.  Compression
+	  is generally considerably better than that achieved by more
+	  conventional LZ77/LZ78-based compressors, and approaches the
+	  performance of the PPM family of statistical compressors.
+
+	  Unless you have a specific application which requires bzip2, you
+	  should probably say N here.
+
 config BUSYBOX_CONFIG_CPIO
 config BUSYBOX_CONFIG_CPIO
 	bool "cpio"
 	bool "cpio"
 	default n
 	default n

+ 6 - 0
package/busybox/config/console-tools/Config.in

@@ -31,6 +31,12 @@ config BUSYBOX_CONFIG_DUMPKMAP
 	  This program dumps the kernel's keyboard translation table to
 	  This program dumps the kernel's keyboard translation table to
 	  stdout, in binary format. You can then use loadkmap to load it.
 	  stdout, in binary format. You can then use loadkmap to load it.
 
 
+config BUSYBOX_CONFIG_KBD_MODE
+	bool "kbd_mode"
+	default n
+	help
+	  This program reports and sets keyboard mode.
+
 config BUSYBOX_CONFIG_LOADFONT
 config BUSYBOX_CONFIG_LOADFONT
 	bool "loadfont"
 	bool "loadfont"
 	default n
 	default n

+ 6 - 0
package/busybox/config/miscutils/Config.in

@@ -282,6 +282,12 @@ config BUSYBOX_CONFIG_FEATURE_MAKEDEVS_TABLE
 
 
 endchoice
 endchoice
 
 
+config BUSYBOX_CONFIG_MICROCOM
+	bool "microcom"
+	default n
+	help
+	  The poor man's minicom utility for chatting with serial port devices.
+
 config BUSYBOX_CONFIG_MOUNTPOINT
 config BUSYBOX_CONFIG_MOUNTPOINT
 	bool "mountpoint"
 	bool "mountpoint"
 	default n
 	default n

+ 40 - 8
package/busybox/config/networking/Config.in

@@ -83,6 +83,15 @@ config BUSYBOX_CONFIG_HTTPD
 	help
 	help
 	  Serve web pages via an HTTP server.
 	  Serve web pages via an HTTP server.
 
 
+config BUSYBOX_CONFIG_FEATURE_HTTPD_RANGES
+	bool "Support 'Ranges:' header"
+	default y
+	depends on BUSYBOX_CONFIG_HTTPD
+	help
+	  Makes httpd emit "Accept-Ranges: bytes" header and understand
+	  "Range: bytes=NNN-[MMM]" header. Allows for resuming interrupted
+	  downloads, seeking in multimedia players etc.
+
 config BUSYBOX_CONFIG_FEATURE_HTTPD_USE_SENDFILE
 config BUSYBOX_CONFIG_FEATURE_HTTPD_USE_SENDFILE
 	bool "Use sendfile system call"
 	bool "Use sendfile system call"
 	default y
 	default y
@@ -183,6 +192,18 @@ config BUSYBOX_CONFIG_FEATURE_HTTPD_ERROR_PAGES
 	  '/path/e404.html' file instead of the terse '404 NOT FOUND'
 	  '/path/e404.html' file instead of the terse '404 NOT FOUND'
 	  message.
 	  message.
 
 
+config BUSYBOX_CONFIG_FEATURE_HTTPD_PROXY
+	bool "Enable support for reverse proxy"
+	default n
+	depends on BUSYBOX_CONFIG_HTTPD
+	help
+	  This option allows you to define URLs that will be forwarded
+	  to another HTTP server. To setup add the following line to the
+	  configuration file
+	        P:/url/:http://hostname[:port]/new/path/
+	  Then a request to /url/myfile will be forwarded to
+	  http://hostname[:port]/new/path/myfile.
+
 config BUSYBOX_CONFIG_IFCONFIG
 config BUSYBOX_CONFIG_IFCONFIG
 	bool "ifconfig"
 	bool "ifconfig"
 	default y
 	default y
@@ -248,7 +269,8 @@ config BUSYBOX_CONFIG_IFUPDOWN
 
 
 config BUSYBOX_CONFIG_IFUPDOWN_IFSTATE_PATH
 config BUSYBOX_CONFIG_IFUPDOWN_IFSTATE_PATH
 	string "Absolute path to ifstate file"
 	string "Absolute path to ifstate file"
-	default "/var/run/ifstate"
+	default n
+	depends on BUSYBOX_CONFIG_IFUPDOWN
 	help
 	help
 	  ifupdown keeps state information in a file called ifstate.
 	  ifupdown keeps state information in a file called ifstate.
 	  Typically it is located in /var/run/ifstate, however
 	  Typically it is located in /var/run/ifstate, however
@@ -307,13 +329,13 @@ config BUSYBOX_CONFIG_FEATURE_IFUPDOWN_IPV6
 	  If you need support for IPv6, turn this option on.
 	  If you need support for IPv6, turn this option on.
 
 
 ### UNUSED
 ### UNUSED
-### config FEATURE_IFUPDOWN_IPX
-### 	bool "Enable support for IPX"
-### 	default n
-### 	depends on IFUPDOWN
-### 	help
-### 	  If this option is selected you can use busybox to work with IPX
-### 	  networks.
+###config FEATURE_IFUPDOWN_IPX
+###	bool "Enable support for IPX"
+###	default n
+###	depends on IFUPDOWN
+###	help
+###	  If this option is selected you can use busybox to work with IPX
+###	  networks.
 
 
 config BUSYBOX_CONFIG_FEATURE_IFUPDOWN_MAPPING
 config BUSYBOX_CONFIG_FEATURE_IFUPDOWN_MAPPING
 	bool "Enable mapping support"
 	bool "Enable mapping support"
@@ -441,6 +463,16 @@ config BUSYBOX_CONFIG_FEATURE_IP_SHORT_FORMS
 	  Say N unless you desparately need the short form of the ip
 	  Say N unless you desparately need the short form of the ip
 	  object commands.
 	  object commands.
 
 
+config BUSYBOX_CONFIG_FEATURE_IP_RARE_PROTOCOLS
+	bool "Support displaying rarely used link types"
+	default n
+	depends on BUSYBOX_CONFIG_IP
+	help
+	  If you are not going to use links of type "frad", "econet",
+	  "bif" etc, you probably don't need to enable this.
+	  Ethernet, wireless, infrared, ppp/slip, ip tunnelling
+	  link types are supported without this option selected.
+
 config BUSYBOX_CONFIG_IPADDR
 config BUSYBOX_CONFIG_IPADDR
 	bool
 	bool
 	default n
 	default n

+ 19 - 0
package/busybox/config/procps/Config.in

@@ -49,6 +49,12 @@ config BUSYBOX_CONFIG_NMETER
 	help
 	help
 	  Prints selected system stats continuously, one line per update.
 	  Prints selected system stats continuously, one line per update.
 
 
+config BUSYBOX_CONFIG_PGREP
+	bool "pgrep"
+	default y
+	help
+	  Look for processes by name.
+
 config BUSYBOX_CONFIG_PIDOF
 config BUSYBOX_CONFIG_PIDOF
 	bool "pidof"
 	bool "pidof"
 	default y
 	default y
@@ -72,6 +78,12 @@ config BUSYBOX_CONFIG_FEATURE_PIDOF_OMIT
 	  The special pid %PPID can be used to name the parent process
 	  The special pid %PPID can be used to name the parent process
 	  of the pidof, in other words the calling shell or shell script.
 	  of the pidof, in other words the calling shell or shell script.
 
 
+config BUSYBOX_CONFIG_PKILL
+	bool "pkill"
+	default y
+	help
+	  Send signals to processes by name.
+
 config BUSYBOX_CONFIG_PS
 config BUSYBOX_CONFIG_PS
 	bool "ps"
 	bool "ps"
 	default y
 	default y
@@ -128,6 +140,13 @@ config BUSYBOX_CONFIG_FEATURE_TOP_DECIMALS
 	help
 	help
 	  Show 1/10th of a percent in CPU/mem statistics.
 	  Show 1/10th of a percent in CPU/mem statistics.
 
 
+config BUSYBOX_CONFIG_FEATURE_TOPMEM
+	bool "topmem"
+	default n
+	depends on BUSYBOX_CONFIG_TOP
+	help
+	  Enable 's' in top (gives lots of memory info)
+
 config BUSYBOX_CONFIG_UPTIME
 config BUSYBOX_CONFIG_UPTIME
 	bool "uptime"
 	bool "uptime"
 	default y
 	default y

+ 8 - 0
package/busybox/config/selinux/Config.in

@@ -104,5 +104,13 @@ config BUSYBOX_CONFIG_FEATURE_SETFILES_CHECK_OPTION
 	  Support "-c" option (check the validity of the contexts against
 	  Support "-c" option (check the validity of the contexts against
 	  the specified binary policy) for setfiles. Requires libsepol.
 	  the specified binary policy) for setfiles. Requires libsepol.
 
 
+config BUSYBOX_CONFIG_SETSEBOOL
+	bool "setsebool"
+	default n
+	depends on BUSYBOX_CONFIG_SELINUX
+	help
+	  Enable support for change boolean.
+	  semanage and -P option is not supported yet.
+
 endmenu
 endmenu
 
 

+ 10 - 0
package/busybox/config/util-linux/Config.in

@@ -360,6 +360,16 @@ config BUSYBOX_CONFIG_MOUNT
 	  NFS filesystems.  Most people using BusyBox will also want to enable
 	  NFS filesystems.  Most people using BusyBox will also want to enable
 	  the 'mount' utility.
 	  the 'mount' utility.
 
 
+config BUSYBOX_CONFIG_FEATURE_MOUNT_HELPERS
+	bool "Support mount helpers"
+	default n
+	depends on BUSYBOX_CONFIG_MOUNT
+	help
+	  Enable mounting of virtual file systems via external helpers.
+	  E.g. mount obexfs#-b00.11.22.33.44.55 /mnt will in effect call
+	  obexfs -b00.11.22.33.44.55 /mnt
+	  The idea is to use such virtual filesystems in /etc/fstab
+
 config BUSYBOX_CONFIG_FEATURE_MOUNT_NFS
 config BUSYBOX_CONFIG_FEATURE_MOUNT_NFS
 	bool "Support mounting NFS file systems"
 	bool "Support mounting NFS file systems"
 	default y
 	default y

+ 21 - 24
package/busybox/patches/340-lock_util.patch

@@ -1,8 +1,8 @@
-Index: busybox-1.7.2/include/applets.h
+Index: busybox-1.8.1/include/applets.h
 ===================================================================
 ===================================================================
---- busybox-1.7.2.orig/include/applets.h	2007-10-30 15:35:03.000000000 -0500
-+++ busybox-1.7.2/include/applets.h	2007-10-30 15:35:03.000000000 -0500
-@@ -209,6 +209,7 @@
+--- busybox-1.8.1.orig/include/applets.h	2007-11-10 16:54:28.318054115 +0100
++++ busybox-1.8.1/include/applets.h	2007-11-10 17:39:21.487529096 +0100
+@@ -218,6 +218,7 @@
  USE_LOAD_POLICY(APPLET(load_policy, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
  USE_LOAD_POLICY(APPLET(load_policy, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
  USE_LOADFONT(APPLET(loadfont, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
  USE_LOADFONT(APPLET(loadfont, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
  USE_LOADKMAP(APPLET(loadkmap, _BB_DIR_SBIN, _BB_SUID_NEVER))
  USE_LOADKMAP(APPLET(loadkmap, _BB_DIR_SBIN, _BB_SUID_NEVER))
@@ -10,10 +10,10 @@ Index: busybox-1.7.2/include/applets.h
  USE_LOGGER(APPLET(logger, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
  USE_LOGGER(APPLET(logger, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
  USE_LOGIN(APPLET(login, _BB_DIR_BIN, _BB_SUID_ALWAYS))
  USE_LOGIN(APPLET(login, _BB_DIR_BIN, _BB_SUID_ALWAYS))
  USE_LOGNAME(APPLET_NOFORK(logname, logname, _BB_DIR_USR_BIN, _BB_SUID_NEVER, logname))
  USE_LOGNAME(APPLET_NOFORK(logname, logname, _BB_DIR_USR_BIN, _BB_SUID_NEVER, logname))
-Index: busybox-1.7.2/miscutils/Config.in
+Index: busybox-1.8.1/miscutils/Config.in
 ===================================================================
 ===================================================================
---- busybox-1.7.2.orig/miscutils/Config.in	2007-10-30 15:34:59.000000000 -0500
-+++ busybox-1.7.2/miscutils/Config.in	2007-10-30 15:35:03.000000000 -0500
+--- busybox-1.8.1.orig/miscutils/Config.in	2007-11-10 16:54:16.477379354 +0100
++++ busybox-1.8.1/miscutils/Config.in	2007-11-10 16:54:28.366056851 +0100
 @@ -244,6 +244,12 @@
 @@ -244,6 +244,12 @@
  	  Enables the 'hdparm -d' option to get/set using_dma flag.
  	  Enables the 'hdparm -d' option to get/set using_dma flag.
  	  This is dangerous stuff, so you should probably say N.
  	  This is dangerous stuff, so you should probably say N.
@@ -27,23 +27,23 @@ Index: busybox-1.7.2/miscutils/Config.in
  config MAKEDEVS
  config MAKEDEVS
  	bool "makedevs"
  	bool "makedevs"
  	default n
  	default n
-Index: busybox-1.7.2/miscutils/Kbuild
+Index: busybox-1.8.1/miscutils/Kbuild
 ===================================================================
 ===================================================================
---- busybox-1.7.2.orig/miscutils/Kbuild	2007-10-30 15:34:59.000000000 -0500
-+++ busybox-1.7.2/miscutils/Kbuild	2007-10-30 15:35:03.000000000 -0500
+--- busybox-1.8.1.orig/miscutils/Kbuild	2007-11-10 16:54:16.481379580 +0100
++++ busybox-1.8.1/miscutils/Kbuild	2007-11-10 16:54:28.370057076 +0100
 @@ -16,6 +16,7 @@
 @@ -16,6 +16,7 @@
  lib-$(CONFIG_HDPARM)      += hdparm.o
  lib-$(CONFIG_HDPARM)      += hdparm.o
  lib-$(CONFIG_LAST)        += last.o
  lib-$(CONFIG_LAST)        += last.o
  lib-$(CONFIG_LESS)        += less.o
  lib-$(CONFIG_LESS)        += less.o
 +lib-$(CONFIG_LOCK)        += lock.o
 +lib-$(CONFIG_LOCK)        += lock.o
  lib-$(CONFIG_MAKEDEVS)    += makedevs.o
  lib-$(CONFIG_MAKEDEVS)    += makedevs.o
+ lib-$(CONFIG_MICROCOM)    += microcom.o
  lib-$(CONFIG_MOUNTPOINT)  += mountpoint.o
  lib-$(CONFIG_MOUNTPOINT)  += mountpoint.o
- lib-$(CONFIG_MT)          += mt.o
-Index: busybox-1.7.2/miscutils/lock.c
+Index: busybox-1.8.1/miscutils/lock.c
 ===================================================================
 ===================================================================
 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ busybox-1.7.2/miscutils/lock.c	2007-10-30 15:35:03.000000000 -0500
-@@ -0,0 +1,135 @@
++++ busybox-1.8.1/miscutils/lock.c	2007-11-10 17:40:37.203843924 +0100
+@@ -0,0 +1,132 @@
 +/*
 +/*
 + * Copyright (C) 2006 Felix Fietkau <[email protected]>
 + * Copyright (C) 2006 Felix Fietkau <[email protected]>
 + *
 + *
@@ -56,7 +56,7 @@ Index: busybox-1.7.2/miscutils/lock.c
 +#include <fcntl.h>
 +#include <fcntl.h>
 +#include <unistd.h>
 +#include <unistd.h>
 +#include <stdio.h>
 +#include <stdio.h>
-+#include "busybox.h" 
++#include "busybox.h"
 +
 +
 +static int unlock = 0;
 +static int unlock = 0;
 +static int shared = 0;
 +static int shared = 0;
@@ -84,19 +84,19 @@ Index: busybox-1.7.2/miscutils/lock.c
 +{
 +{
 +	FILE *f;
 +	FILE *f;
 +	int i;
 +	int i;
-+	
++
 +	if ((f = fopen(file, "r")) == NULL)
 +	if ((f = fopen(file, "r")) == NULL)
 +		return 0;
 +		return 0;
-+	
++
 +	fscanf(f, "%d", &i);
 +	fscanf(f, "%d", &i);
 +	if (i > 0)
 +	if (i > 0)
 +		kill(i, SIGTERM);
 +		kill(i, SIGTERM);
-+	
++
 +	fclose(f);
 +	fclose(f);
 +
 +
 +	return 0;
 +	return 0;
 +}
 +}
-+		
++
 +static int do_lock(void)
 +static int do_lock(void)
 +{
 +{
 +	int pid;
 +	int pid;
@@ -118,7 +118,7 @@ Index: busybox-1.7.2/miscutils/lock.c
 +
 +
 +	if (pid < 0)
 +	if (pid < 0)
 +		return -1;
 +		return -1;
-+	
++
 +	if (pid == 0) {
 +	if (pid == 0) {
 +		signal(SIGKILL, exit_unlock);
 +		signal(SIGKILL, exit_unlock);
 +		signal(SIGTERM, exit_unlock);
 +		signal(SIGTERM, exit_unlock);
@@ -142,11 +142,8 @@ Index: busybox-1.7.2/miscutils/lock.c
 +	return 0;
 +	return 0;
 +}
 +}
 +
 +
-+#ifndef CONFIG_LOCK
-+int main(int argc, char **argv)
-+#else
++int lock_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
 +int lock_main(int argc, char **argv)
 +int lock_main(int argc, char **argv)
-+#endif
 +{
 +{
 +	char **args = &argv[1];
 +	char **args = &argv[1];
 +	int c = argc - 1;
 +	int c = argc - 1;

+ 16 - 16
package/busybox/patches/350-httpd_redir.patch

@@ -1,8 +1,8 @@
-Index: busybox-1.7.2/include/usage.h
+Index: busybox-1.8.1/include/usage.h
 ===================================================================
 ===================================================================
---- busybox-1.7.2.orig/include/usage.h	2007-10-30 15:34:59.000000000 -0500
-+++ busybox-1.7.2/include/usage.h	2007-10-30 15:35:03.000000000 -0500
-@@ -1350,7 +1350,8 @@
+--- busybox-1.8.1.orig/include/usage.h	2007-11-10 16:54:16.433376848 +0100
++++ busybox-1.8.1/include/usage.h	2007-11-10 16:54:29.970148260 +0100
+@@ -1418,7 +1418,8 @@
  	USE_FEATURE_HTTPD_BASIC_AUTH(" [-r realm]") \
  	USE_FEATURE_HTTPD_BASIC_AUTH(" [-r realm]") \
  	USE_FEATURE_HTTPD_AUTH_MD5(" [-m pass]") \
  	USE_FEATURE_HTTPD_AUTH_MD5(" [-m pass]") \
         " [-h home]" \
         " [-h home]" \
@@ -12,7 +12,7 @@ Index: busybox-1.7.2/include/usage.h
  #define httpd_full_usage \
  #define httpd_full_usage \
         "Listen for incoming HTTP requests" \
         "Listen for incoming HTTP requests" \
         "\n\nOptions:" \
         "\n\nOptions:" \
-@@ -1368,6 +1369,8 @@
+@@ -1436,6 +1437,8 @@
         "\n	-h HOME		Home directory (default .)" \
         "\n	-h HOME		Home directory (default .)" \
         "\n	-e STRING	HTML encode STRING" \
         "\n	-e STRING	HTML encode STRING" \
         "\n	-d STRING	URL decode STRING" \
         "\n	-d STRING	URL decode STRING" \
@@ -20,12 +20,12 @@ Index: busybox-1.7.2/include/usage.h
 +       "\n	-H HOST 	Redirect target host" \
 +       "\n	-H HOST 	Redirect target host" \
  
  
  #define hwclock_trivial_usage \
  #define hwclock_trivial_usage \
-        "[-r|--show] [-s|--hctosys] [-w|--systohc]" \
-Index: busybox-1.7.2/networking/httpd.c
+ 	USE_GETOPT_LONG( \
+Index: busybox-1.8.1/networking/httpd.c
 ===================================================================
 ===================================================================
---- busybox-1.7.2.orig/networking/httpd.c	2007-10-30 15:35:03.000000000 -0500
-+++ busybox-1.7.2/networking/httpd.c	2007-10-30 15:35:03.000000000 -0500
-@@ -230,6 +230,8 @@
+--- busybox-1.8.1.orig/networking/httpd.c	2007-11-10 16:54:28.346055711 +0100
++++ busybox-1.8.1/networking/httpd.c	2007-11-10 16:54:56.639668071 +0100
+@@ -253,6 +253,8 @@
  
  
  	const char *found_mime_type;
  	const char *found_mime_type;
  	const char *found_moved_temporarily;
  	const char *found_moved_temporarily;
@@ -34,16 +34,16 @@ Index: busybox-1.7.2/networking/httpd.c
  	Htaccess_IP *ip_a_d;    /* config allow/deny lines */
  	Htaccess_IP *ip_a_d;    /* config allow/deny lines */
  
  
  	USE_FEATURE_HTTPD_BASIC_AUTH(const char *g_realm;)
  	USE_FEATURE_HTTPD_BASIC_AUTH(const char *g_realm;)
-@@ -264,6 +266,8 @@
+@@ -297,6 +299,8 @@
  #define home_httpd        (G.home_httpd       )
  #define home_httpd        (G.home_httpd       )
  #define found_mime_type   (G.found_mime_type  )
  #define found_mime_type   (G.found_mime_type  )
  #define found_moved_temporarily (G.found_moved_temporarily)
  #define found_moved_temporarily (G.found_moved_temporarily)
 +#define redirect_path     (G.redirect_path    )
 +#define redirect_path     (G.redirect_path    )
 +#define redirect_host     (G.redirect_host    )
 +#define redirect_host     (G.redirect_host    )
- #define ContentLength     (G.ContentLength    )
  #define last_mod          (G.last_mod         )
  #define last_mod          (G.last_mod         )
  #define ip_a_d            (G.ip_a_d           )
  #define ip_a_d            (G.ip_a_d           )
-@@ -901,8 +905,11 @@
+ #define g_realm           (G.g_realm          )
+@@ -988,8 +992,11 @@
  	}
  	}
  #endif
  #endif
  	if (responseNum == HTTP_MOVED_TEMPORARILY) {
  	if (responseNum == HTTP_MOVED_TEMPORARILY) {
@@ -56,7 +56,7 @@ Index: busybox-1.7.2/networking/httpd.c
  				(g_query ? "?" : ""),
  				(g_query ? "?" : ""),
  				(g_query ? g_query : ""));
  				(g_query ? g_query : ""));
  	}
  	}
-@@ -1730,8 +1737,12 @@
+@@ -1907,8 +1914,12 @@
  	*++urlp = '\0';       /* so keep last character */
  	*++urlp = '\0';       /* so keep last character */
  	tptr = urlp;          /* end ptr */
  	tptr = urlp;          /* end ptr */
  
  
@@ -70,7 +70,7 @@ Index: busybox-1.7.2/networking/httpd.c
  		if (is_directory(urlcopy + 1, 1, &sb)) {
  		if (is_directory(urlcopy + 1, 1, &sb)) {
  			found_moved_temporarily = urlcopy;
  			found_moved_temporarily = urlcopy;
  		}
  		}
-@@ -2004,7 +2015,9 @@
+@@ -2252,7 +2263,9 @@
  #endif
  #endif
  
  
  enum {
  enum {
@@ -81,7 +81,7 @@ Index: busybox-1.7.2/networking/httpd.c
  	d_opt_decode_url,
  	d_opt_decode_url,
  	h_opt_home_httpd,
  	h_opt_home_httpd,
  	USE_FEATURE_HTTPD_ENCODE_URL_STR(e_opt_encode_url,)
  	USE_FEATURE_HTTPD_ENCODE_URL_STR(e_opt_encode_url,)
-@@ -2053,12 +2066,13 @@
+@@ -2301,12 +2314,13 @@
  	/* We do not "absolutize" path given by -h (home) opt.
  	/* We do not "absolutize" path given by -h (home) opt.
  	 * If user gives relative path in -h, $SCRIPT_FILENAME can end up
  	 * If user gives relative path in -h, $SCRIPT_FILENAME can end up
  	 * relative too. */
  	 * relative too. */

+ 90 - 105
package/busybox/patches/470-insmod_search.patch

@@ -1,8 +1,8 @@
-Index: busybox-1.7.2/modutils/insmod.c
+Index: busybox-1.8.1/modutils/insmod.c
 ===================================================================
 ===================================================================
---- busybox-1.7.2.orig/modutils/insmod.c	2007-10-30 15:34:59.000000000 -0500
-+++ busybox-1.7.2/modutils/insmod.c	2007-10-30 15:35:05.000000000 -0500
-@@ -61,19 +61,114 @@
+--- busybox-1.8.1.orig/modutils/insmod.c	2007-11-10 02:40:49.000000000 +0100
++++ busybox-1.8.1/modutils/insmod.c	2007-11-10 17:28:44.391223047 +0100
+@@ -61,21 +61,117 @@
  #include "libbb.h"
  #include "libbb.h"
  #include <libgen.h>
  #include <libgen.h>
  #include <sys/utsname.h>
  #include <sys/utsname.h>
@@ -17,17 +17,18 @@ Index: busybox-1.7.2/modutils/insmod.c
  #define ENABLE_FEATURE_2_4_MODULES 1
  #define ENABLE_FEATURE_2_4_MODULES 1
  #endif
  #endif
  
  
--#if !ENABLE_FEATURE_2_4_MODULES
--#define insmod_ng_main insmod_main
-+#if ENABLE_FEATURE_2_4_MODULES
-+int insmod_main_24(int argc, char **argv);
- #endif
+-/*
+- * Big piece of 2.4-specific code
+- */
+ #if ENABLE_FEATURE_2_4_MODULES
 -
 -
++int insmod_main_24(int argc, char **argv);
++#endif
  #if ENABLE_FEATURE_2_6_MODULES
  #if ENABLE_FEATURE_2_6_MODULES
--extern int insmod_ng_main( int argc, char **argv);
+-static int insmod_ng_main(int argc, char **argv);
 +int insmod_main_26(int argc, char **argv);
 +int insmod_main_26(int argc, char **argv);
- #endif
-+int insmod_main(int argc, char **argv);
++#endif
++int insmod_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
 +
 +
 +static char *g_filename = NULL;
 +static char *g_filename = NULL;
 +#define _PATH_MODULES	"/lib/modules"
 +#define _PATH_MODULES	"/lib/modules"
@@ -36,20 +37,18 @@ Index: busybox-1.7.2/modutils/insmod.c
 +				   void *userdata, int depth)
 +				   void *userdata, int depth)
 +{
 +{
 +	char *fullname = (char *) userdata;
 +	char *fullname = (char *) userdata;
++	char *tmp;
 +
 +
 +	if (fullname[0] == '\0')
 +	if (fullname[0] == '\0')
 +		return FALSE;
 +		return FALSE;
-+	else {
-+		char *tmp, *tmp1 = xstrdup(filename);
-+		tmp = bb_get_last_path_component(tmp1);
-+		if (strcmp(tmp, fullname) == 0) {
-+			free(tmp1);
-+			/* Stop searching if we find a match */
-+			g_filename = xstrdup(filename);
-+			return FALSE;
-+		}
-+		free(tmp1);
++
++	tmp = bb_get_last_path_component_nostrip(filename);
++	if (strcmp(tmp, fullname) == 0) {
++		/* Stop searching if we find a match */
++		g_filename = xstrdup(filename);
++		return FALSE;
 +	}
 +	}
++
 +	return TRUE;
 +	return TRUE;
 +}
 +}
 +
 +
@@ -70,7 +69,7 @@ Index: busybox-1.7.2/modutils/insmod.c
 +	if (k_version <= 4)
 +	if (k_version <= 4)
 +		suffix = ".o";
 +		suffix = ".o";
 +	else
 +	else
-+#endif
+ #endif
 +		suffix = ".ko";
 +		suffix = ".ko";
 +
 +
 +	len = strlen(filename);
 +	len = strlen(filename);
@@ -112,16 +111,21 @@ Index: busybox-1.7.2/modutils/insmod.c
 +		ret = 0;
 +		ret = 0;
 +	else
 +	else
 +		free(g_filename);
 +		free(g_filename);
-+
+ 
 +done:
 +done:
 +	free(filename);
 +	free(filename);
 +
 +
 +	return ret;
 +	return ret;
 +}
 +}
- 
- 
- #if ENABLE_FEATURE_2_4_MODULES
-@@ -677,7 +772,6 @@
++
++/*
++ * Big piece of 2.4-specific code
++ */
++#if ENABLE_FEATURE_2_4_MODULES
+ #if ENABLE_FEATURE_INSMOD_LOADINKMEM
+ #define LOADBITS 0
+ #else
+@@ -673,7 +769,6 @@
  #endif
  #endif
  
  
  
  
@@ -129,14 +133,10 @@ Index: busybox-1.7.2/modutils/insmod.c
  enum { STRVERSIONLEN = 64 };
  enum { STRVERSIONLEN = 64 };
  
  
  /*======================================================================*/
  /*======================================================================*/
-@@ -790,37 +884,6 @@
- static int n_ext_modules_used;
- extern int delete_module(const char *);
+@@ -789,27 +884,6 @@
+ static char *m_fullName;
+ 
  
  
--static char *m_filename;
--static char *m_fullName;
--
--
 -/*======================================================================*/
 -/*======================================================================*/
 -
 -
 -
 -
@@ -144,35 +144,29 @@ Index: busybox-1.7.2/modutils/insmod.c
 -				void *userdata, int depth)
 -				void *userdata, int depth)
 -{
 -{
 -	char *fullname = (char *) userdata;
 -	char *fullname = (char *) userdata;
+-	char *tmp;
 -
 -
 -	if (fullname[0] == '\0')
 -	if (fullname[0] == '\0')
 -		return FALSE;
 -		return FALSE;
--	else {
--		char *tmp, *tmp1 = xstrdup(filename);
--		tmp = bb_get_last_path_component(tmp1);
--		if (strcmp(tmp, fullname) == 0) {
--			free(tmp1);
--			/* Stop searching if we find a match */
--			m_filename = xstrdup(filename);
--			return FALSE;
--		}
--		free(tmp1);
+-
+-	tmp = bb_get_last_path_component_nostrip(filename);
+-	if (strcmp(tmp, fullname) == 0) {
+-		/* Stop searching if we find a match */
+-		m_filename = xstrdup(filename);
+-		return FALSE;
 -	}
 -	}
 -	return TRUE;
 -	return TRUE;
 -}
 -}
 -
 -
--
--/*======================================================================*/
--
- static struct obj_file *arch_new_file(void)
- {
- 	struct arch_file *f;
-@@ -3952,145 +4015,57 @@
+ 
+ /*======================================================================*/
+ 
+@@ -3897,145 +3971,57 @@
  void print_load_map(struct obj_file *f);
  void print_load_map(struct obj_file *f);
  #endif
  #endif
  
  
--int insmod_main( int argc, char **argv);
--int insmod_main( int argc, char **argv)
+-int insmod_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
+-int insmod_main(int argc, char **argv)
 +int insmod_main_24( int argc, char **argv)
 +int insmod_main_24( int argc, char **argv)
  {
  {
  	char *opt_o, *arg1;
  	char *opt_o, *arg1;
@@ -183,7 +177,7 @@ Index: busybox-1.7.2/modutils/insmod.c
  	ElfW(Addr) m_addr;
  	ElfW(Addr) m_addr;
  	struct obj_file *f;
  	struct obj_file *f;
 -	struct stat st;
 -	struct stat st;
--	char *m_name = 0;
+-	char *m_name = NULL;
 -	int exit_status = EXIT_FAILURE;
 -	int exit_status = EXIT_FAILURE;
 +	char *tmp = NULL, *m_name = NULL;
 +	char *tmp = NULL, *m_name = NULL;
 +	int ret = EINVAL;
 +	int ret = EINVAL;
@@ -194,12 +188,11 @@ Index: busybox-1.7.2/modutils/insmod.c
  	int m_version, m_crcs;
  	int m_version, m_crcs;
  #endif
  #endif
 -#if ENABLE_FEATURE_CLEAN_UP
 -#if ENABLE_FEATURE_CLEAN_UP
--	FILE *fp = 0;
+ 	FILE *fp = NULL;
 -#else
 -#else
 -	FILE *fp;
 -	FILE *fp;
 -#endif
 -#endif
 -	int k_version = 0;
 -	int k_version = 0;
-+	FILE *fp = NULL;
 +	int k_version;
 +	int k_version;
  	struct utsname myuname;
  	struct utsname myuname;
  
  
@@ -247,8 +240,8 @@ Index: busybox-1.7.2/modutils/insmod.c
 -			len -= 2;
 -			len -= 2;
 -			tmp[len] = '\0';
 -			tmp[len] = '\0';
 -		}
 -		}
--
  
  
+-
 -#if ENABLE_FEATURE_2_6_MODULES
 -#if ENABLE_FEATURE_2_6_MODULES
 -	if (k_version > 4)
 -	if (k_version > 4)
 -		m_fullName = xasprintf("%s.ko", tmp);
 -		m_fullName = xasprintf("%s.ko", tmp);
@@ -263,12 +256,12 @@ Index: busybox-1.7.2/modutils/insmod.c
 -		m_name = tmp;
 -		m_name = tmp;
 -	} else {
 -	} else {
 -		free(tmp1);
 -		free(tmp1);
--		tmp1 = 0;       /* flag for free(m_name) before exit() */
+-		tmp1 = NULL;       /* flag for free(m_name) before exit() */
 +		tmp = xstrdup(arg1);
 +		tmp = xstrdup(arg1);
 +		m_name = basename(tmp);
 +		m_name = basename(tmp);
  	}
  	}
  
  
--	/* Get a filedesc for the module.  Check we we have a complete path */
+-	/* Get a filedesc for the module.  Check that we have a complete path */
 -	if (stat(arg1, &st) < 0 || !S_ISREG(st.st_mode)
 -	if (stat(arg1, &st) < 0 || !S_ISREG(st.st_mode)
 -	 || (fp = fopen(arg1, "r")) == NULL
 -	 || (fp = fopen(arg1, "r")) == NULL
 -	) {
 -	) {
@@ -277,7 +270,6 @@ Index: busybox-1.7.2/modutils/insmod.c
 -		if (k_version) {	/* uname succeedd */
 -		if (k_version) {	/* uname succeedd */
 -			char *module_dir;
 -			char *module_dir;
 -			char *tmdn;
 -			char *tmdn;
--			char real_module_dir[FILENAME_MAX];
 -
 -
 -			tmdn = concat_path_file(_PATH_MODULES, myuname.release);
 -			tmdn = concat_path_file(_PATH_MODULES, myuname.release);
 -			/* Jump through hoops in case /lib/modules/`uname -r`
 -			/* Jump through hoops in case /lib/modules/`uname -r`
@@ -285,36 +277,37 @@ Index: busybox-1.7.2/modutils/insmod.c
 -			 * follow symlinks, but we do want to follow the
 -			 * follow symlinks, but we do want to follow the
 -			 * /lib/modules/`uname -r` dir, So resolve it ourselves
 -			 * /lib/modules/`uname -r` dir, So resolve it ourselves
 -			 * if it is a link... */
 -			 * if it is a link... */
--			if (realpath(tmdn, real_module_dir) == NULL)
--				module_dir = tmdn;
--			else
--				module_dir = real_module_dir;
+-			module_dir = xmalloc_readlink(tmdn);
+-			if (!module_dir)
+-				module_dir = xstrdup(tmdn);
 -			recursive_action(module_dir, ACTION_RECURSE,
 -			recursive_action(module_dir, ACTION_RECURSE,
--					check_module_name_match, 0, m_fullName, 0);
+-					check_module_name_match, NULL, m_fullName, 0);
+-			free(module_dir);
 -			free(tmdn);
 -			free(tmdn);
 -		}
 -		}
 -
 -
 -		/* Check if we have found anything yet */
 -		/* Check if we have found anything yet */
--		if (m_filename == 0 || ((fp = fopen(m_filename, "r")) == NULL)) {
--			char module_dir[FILENAME_MAX];
+-		if (!m_filename || ((fp = fopen(m_filename, "r")) == NULL)) {
+-			int r;
+-			char *module_dir;
 -
 -
 -			free(m_filename);
 -			free(m_filename);
--			m_filename = 0;
--			if (realpath (_PATH_MODULES, module_dir) == NULL)
--				strcpy(module_dir, _PATH_MODULES);
+-			m_filename = NULL;
+-			module_dir = xmalloc_readlink(_PATH_MODULES);
+-			if (!module_dir)
+-				module_dir = xstrdup(_PATH_MODULES);
 -			/* No module found under /lib/modules/`uname -r`, this
 -			/* No module found under /lib/modules/`uname -r`, this
 -			 * time cast the net a bit wider.  Search /lib/modules/ */
 -			 * time cast the net a bit wider.  Search /lib/modules/ */
--			if (!recursive_action(module_dir, ACTION_RECURSE,
--						    check_module_name_match, 0, m_fullName, 0)
+-			r = recursive_action(module_dir, ACTION_RECURSE,
+-					check_module_name_match, NULL, m_fullName, 0);
+-			if (r)
+-				bb_error_msg_and_die("%s: module not found", m_fullName);
+-			free(module_dir);
+-			if (m_filename == NULL
+-			 || ((fp = fopen(m_filename, "r")) == NULL)
 -			) {
 -			) {
--				if (m_filename == 0
--				 || ((fp = fopen(m_filename, "r")) == NULL)
--				) {
--					bb_error_msg("%s: no module by that name found", m_fullName);
--					goto out;
--				}
--			} else
--				bb_error_msg_and_die("%s: no module by that name found", m_fullName);
+-				bb_error_msg_and_die("%s: module not found", m_fullName);
+-			}
 -		}
 -		}
 -	} else
 -	} else
 -		m_filename = xstrdup(arg1);
 -		m_filename = xstrdup(arg1);
@@ -335,8 +328,8 @@ Index: busybox-1.7.2/modutils/insmod.c
 -#endif
 -#endif
  
  
  	f = obj_load(fp, LOADBITS);
  	f = obj_load(fp, LOADBITS);
- 	if (f == NULL)
-@@ -4120,7 +4095,7 @@
+ 
+@@ -4062,7 +4048,7 @@
  				"\t%s was compiled for kernel version %s\n"
  				"\t%s was compiled for kernel version %s\n"
  				"\twhile this kernel is version %s",
  				"\twhile this kernel is version %s",
  				flag_force_load ? "warning: " : "",
  				flag_force_load ? "warning: " : "",
@@ -345,7 +338,7 @@ Index: busybox-1.7.2/modutils/insmod.c
  			if (!flag_force_load)
  			if (!flag_force_load)
  				goto out;
  				goto out;
  		}
  		}
-@@ -4173,7 +4148,7 @@
+@@ -4104,7 +4090,7 @@
  	hide_special_symbols(f);
  	hide_special_symbols(f);
  
  
  #if ENABLE_FEATURE_INSMOD_KSYMOOPS_SYMBOLS
  #if ENABLE_FEATURE_INSMOD_KSYMOOPS_SYMBOLS
@@ -354,14 +347,14 @@ Index: busybox-1.7.2/modutils/insmod.c
  #endif /* FEATURE_INSMOD_KSYMOOPS_SYMBOLS */
  #endif /* FEATURE_INSMOD_KSYMOOPS_SYMBOLS */
  
  
  	new_create_module_ksymtab(f);
  	new_create_module_ksymtab(f);
-@@ -4220,30 +4195,22 @@
+@@ -4147,18 +4133,19 @@
  	if (flag_print_load_map)
  	if (flag_print_load_map)
  		print_load_map(f);
  		print_load_map(f);
  
  
 -	exit_status = EXIT_SUCCESS;
 -	exit_status = EXIT_SUCCESS;
--
-+	ret = 0;
- out:
++	ret = EXIT_SUCCESS;
+ 
+  out:
  #if ENABLE_FEATURE_CLEAN_UP
  #if ENABLE_FEATURE_CLEAN_UP
  	if (fp)
  	if (fp)
  		fclose(fp);
  		fclose(fp);
@@ -377,26 +370,18 @@ Index: busybox-1.7.2/modutils/insmod.c
 -	return exit_status;
 -	return exit_status;
 +	return ret;
 +	return ret;
  }
  }
--
--
- #endif
  
  
--
- #if ENABLE_FEATURE_2_6_MODULES
--
--#include <sys/mman.h>
--#include <asm/unistd.h>
--#include <sys/syscall.h>
--
- /* We use error numbers in a loose translation... */
- static const char *moderror(int err)
- {
-@@ -4261,19 +4228,32 @@
+ #endif /* ENABLE_FEATURE_2_4_MODULES */
+@@ -4190,23 +4177,32 @@
  	}
  	}
  }
  }
  
  
--int insmod_ng_main(int argc, char **argv);
--int insmod_ng_main(int argc, char **argv)
+-#if !ENABLE_FEATURE_2_4_MODULES
+-int insmod_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
+-int insmod_main(int argc, char **argv)
+-#else
+-static int insmod_ng_main(int argc, char **argv)
+-#endif
 +int insmod_main_26(int argc, char **argv)
 +int insmod_main_26(int argc, char **argv)
  {
  {
 -	long ret;
 -	long ret;
@@ -429,7 +414,7 @@ Index: busybox-1.7.2/modutils/insmod.c
  	/* Rest is options */
  	/* Rest is options */
  	options = xzalloc(1);
  	options = xzalloc(1);
  	optlen = 0;
  	optlen = 0;
-@@ -4283,36 +4263,47 @@
+@@ -4216,36 +4212,47 @@
  		optlen += sprintf(options + optlen, (strchr(*argv,' ') ? "\"%s\" " : "%s "), *argv);
  		optlen += sprintf(options + optlen, (strchr(*argv,' ') ? "\"%s\" " : "%s "), *argv);
  	}
  	}
  
  

Разница между файлами не показана из-за своего большого размера
+ 169 - 168
package/busybox/patches/500-ipkg.patch


+ 15 - 15
package/busybox/patches/501-libbb_hash.patch

@@ -1,7 +1,7 @@
-Index: busybox-1.7.2/coreutils/md5_sha1_sum.c
+Index: busybox-1.8.1/coreutils/md5_sha1_sum.c
 ===================================================================
 ===================================================================
---- busybox-1.7.2.orig/coreutils/md5_sha1_sum.c	2007-10-30 15:34:59.000000000 -0500
-+++ busybox-1.7.2/coreutils/md5_sha1_sum.c	2007-10-30 15:35:06.000000000 -0500
+--- busybox-1.8.1.orig/coreutils/md5_sha1_sum.c	2007-11-10 02:40:51.000000000 +0100
++++ busybox-1.8.1/coreutils/md5_sha1_sum.c	2007-11-10 17:05:59.957468399 +0100
 @@ -8,75 +8,10 @@
 @@ -8,75 +8,10 @@
  
  
  #include "libbb.h"
  #include "libbb.h"
@@ -75,14 +75,14 @@ Index: busybox-1.7.2/coreutils/md5_sha1_sum.c
 -	return hash_value;
 -	return hash_value;
 -}
 -}
 -
 -
- int md5_sha1_sum_main(int argc, char **argv);
+ int md5_sha1_sum_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
  int md5_sha1_sum_main(int argc, char **argv)
  int md5_sha1_sum_main(int argc, char **argv)
  {
  {
-Index: busybox-1.7.2/include/libbb.h
+Index: busybox-1.8.1/include/libbb.h
 ===================================================================
 ===================================================================
---- busybox-1.7.2.orig/include/libbb.h	2007-10-30 15:35:04.000000000 -0500
-+++ busybox-1.7.2/include/libbb.h	2007-10-30 15:35:06.000000000 -0500
-@@ -947,6 +947,7 @@
+--- busybox-1.8.1.orig/include/libbb.h	2007-11-10 16:55:07.048261223 +0100
++++ busybox-1.8.1/include/libbb.h	2007-11-10 17:04:07.543062264 +0100
+@@ -1022,6 +1022,7 @@
  extern const char bb_uuenc_tbl_std[];
  extern const char bb_uuenc_tbl_std[];
  void bb_uuencode(char *store, const void *s, int length, const char *tbl);
  void bb_uuencode(char *store, const void *s, int length, const char *tbl);
  
  
@@ -90,7 +90,7 @@ Index: busybox-1.7.2/include/libbb.h
  typedef struct sha1_ctx_t {
  typedef struct sha1_ctx_t {
  	uint32_t count[2];
  	uint32_t count[2];
  	uint32_t hash[5];
  	uint32_t hash[5];
-@@ -968,6 +969,8 @@
+@@ -1043,6 +1044,8 @@
  void md5_begin(md5_ctx_t *ctx);
  void md5_begin(md5_ctx_t *ctx);
  void md5_hash(const void *data, size_t length, md5_ctx_t *ctx);
  void md5_hash(const void *data, size_t length, md5_ctx_t *ctx);
  void *md5_end(void *resbuf, md5_ctx_t *ctx);
  void *md5_end(void *resbuf, md5_ctx_t *ctx);
@@ -99,11 +99,11 @@ Index: busybox-1.7.2/include/libbb.h
  
  
  uint32_t *crc32_filltable(uint32_t *tbl256, int endian);
  uint32_t *crc32_filltable(uint32_t *tbl256, int endian);
  
  
-Index: busybox-1.7.2/libbb/Kbuild
+Index: busybox-1.8.1/libbb/Kbuild
 ===================================================================
 ===================================================================
---- busybox-1.7.2.orig/libbb/Kbuild	2007-10-30 15:34:59.000000000 -0500
-+++ busybox-1.7.2/libbb/Kbuild	2007-10-30 15:35:06.000000000 -0500
-@@ -38,6 +38,7 @@
+--- busybox-1.8.1.orig/libbb/Kbuild	2007-11-10 02:40:52.000000000 +0100
++++ busybox-1.8.1/libbb/Kbuild	2007-11-10 17:04:07.547062497 +0100
+@@ -39,6 +39,7 @@
  lib-y += get_last_path_component.o
  lib-y += get_last_path_component.o
  lib-y += get_line_from_file.o
  lib-y += get_line_from_file.o
  lib-y += getopt32.o
  lib-y += getopt32.o
@@ -111,10 +111,10 @@ Index: busybox-1.7.2/libbb/Kbuild
  lib-y += herror_msg.o
  lib-y += herror_msg.o
  lib-y += herror_msg_and_die.o
  lib-y += herror_msg_and_die.o
  lib-y += human_readable.o
  lib-y += human_readable.o
-Index: busybox-1.7.2/libbb/hash.c
+Index: busybox-1.8.1/libbb/hash.c
 ===================================================================
 ===================================================================
 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ busybox-1.7.2/libbb/hash.c	2007-10-30 15:35:06.000000000 -0500
++++ busybox-1.8.1/libbb/hash.c	2007-11-10 17:04:07.551062729 +0100
 @@ -0,0 +1,81 @@
 @@ -0,0 +1,81 @@
 +/*
 +/*
 + *  Copyright (C) 2003 Glenn L. McGrath
 + *  Copyright (C) 2003 Glenn L. McGrath

+ 30 - 31
package/busybox/patches/510-awx.patch

@@ -1,7 +1,7 @@
-Index: busybox-1.7.2/editors/awk.c
+Index: busybox-1.8.1/editors/awk.c
 ===================================================================
 ===================================================================
---- busybox-1.7.2.orig/editors/awk.c	2007-10-30 15:35:03.000000000 -0500
-+++ busybox-1.7.2/editors/awk.c	2007-10-30 15:35:06.000000000 -0500
+--- busybox-1.8.1.orig/editors/awk.c	2007-11-10 16:55:07.032260312 +0100
++++ busybox-1.8.1/editors/awk.c	2007-11-10 17:07:04.493146078 +0100
 @@ -33,6 +33,11 @@
 @@ -33,6 +33,11 @@
  /* these flags are static, don't change them when value is changed */
  /* these flags are static, don't change them when value is changed */
  #define	VF_DONTTOUCH    (VF_ARRAY | VF_SPECIAL | VF_WALK | VF_CHILD | VF_DIRTY)
  #define	VF_DONTTOUCH    (VF_ARRAY | VF_SPECIAL | VF_WALK | VF_CHILD | VF_DIRTY)
@@ -71,21 +71,20 @@ Index: busybox-1.7.2/editors/awk.c
  			g_progname = L.s;
  			g_progname = L.s;
  
  
  			nvfree(fnargs);
  			nvfree(fnargs);
-@@ -2753,6 +2768,13 @@
+@@ -2753,6 +2768,12 @@
  }
  }
  
  
- int awk_main(int argc, char **argv);
+ int awk_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
 +int awx_main(int argc, char **argv);
 +int awx_main(int argc, char **argv);
 +
 +
 +#ifdef CONFIG_AWX
 +#ifdef CONFIG_AWX
 +static int is_awx = 0;
 +static int is_awx = 0;
 +#include "awx.c"
 +#include "awx.c"
 +#endif
 +#endif
-+
  int awk_main(int argc, char **argv)
  int awk_main(int argc, char **argv)
  {
  {
  	unsigned opt;
  	unsigned opt;
-@@ -2817,6 +2839,11 @@
+@@ -2817,6 +2838,11 @@
  			*s1 = '=';
  			*s1 = '=';
  		}
  		}
  	}
  	}
@@ -97,10 +96,10 @@ Index: busybox-1.7.2/editors/awk.c
  	opt_complementary = "v::f::";
  	opt_complementary = "v::f::";
  	opt = getopt32(argv, "F:v:f:W:", &opt_F, &opt_v, &opt_f, &opt_W);
  	opt = getopt32(argv, "F:v:f:W:", &opt_F, &opt_v, &opt_f, &opt_W);
  	argv += optind;
  	argv += optind;
-Index: busybox-1.7.2/editors/awx.c
+Index: busybox-1.8.1/editors/awx.c
 ===================================================================
 ===================================================================
 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ busybox-1.7.2/editors/awx.c	2007-10-30 15:35:06.000000000 -0500
++++ busybox-1.8.1/editors/awx.c	2007-11-10 17:06:19.258568308 +0100
 @@ -0,0 +1,636 @@
 @@ -0,0 +1,636 @@
 +/*
 +/*
 + * awk web extension
 + * awk web extension
@@ -738,10 +737,10 @@ Index: busybox-1.7.2/editors/awx.c
 +	return awk_main(argc, argv);
 +	return awk_main(argc, argv);
 +}
 +}
 +
 +
-Index: busybox-1.7.2/editors/awx_parser.h
+Index: busybox-1.8.1/editors/awx_parser.h
 ===================================================================
 ===================================================================
 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ busybox-1.7.2/editors/awx_parser.h	2007-10-30 15:35:06.000000000 -0500
++++ busybox-1.8.1/editors/awx_parser.h	2007-11-10 17:06:19.266568760 +0100
 @@ -0,0 +1,38 @@
 @@ -0,0 +1,38 @@
 +#ifndef __TEMPLATE_PARSER_H
 +#ifndef __TEMPLATE_PARSER_H
 +#define __TEMPLATE_PARSER_H
 +#define __TEMPLATE_PARSER_H
@@ -781,10 +780,10 @@ Index: busybox-1.7.2/editors/awx_parser.h
 +void free_template(struct template_cb *cb, struct template_element *e);
 +void free_template(struct template_cb *cb, struct template_element *e);
 +
 +
 +#endif
 +#endif
-Index: busybox-1.7.2/editors/awx_parser.l
+Index: busybox-1.8.1/editors/awx_parser.l
 ===================================================================
 ===================================================================
 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ busybox-1.7.2/editors/awx_parser.l	2007-10-30 15:35:06.000000000 -0500
++++ busybox-1.8.1/editors/awx_parser.l	2007-11-10 17:06:19.270568989 +0100
 @@ -0,0 +1,302 @@
 @@ -0,0 +1,302 @@
 +%{
 +%{
 +#include <stdio.h>
 +#include <stdio.h>
@@ -1088,10 +1087,10 @@ Index: busybox-1.7.2/editors/awx_parser.l
 +	free(e);
 +	free(e);
 +	return free_template(cb, next);
 +	return free_template(cb, next);
 +}
 +}
-Index: busybox-1.7.2/editors/Config.in
+Index: busybox-1.8.1/editors/Config.in
 ===================================================================
 ===================================================================
---- busybox-1.7.2.orig/editors/Config.in	2007-10-30 15:34:59.000000000 -0500
-+++ busybox-1.7.2/editors/Config.in	2007-10-30 15:35:06.000000000 -0500
+--- busybox-1.8.1.orig/editors/Config.in	2007-11-10 02:40:54.000000000 +0100
++++ busybox-1.8.1/editors/Config.in	2007-11-10 17:06:19.274569218 +0100
 @@ -12,6 +12,13 @@
 @@ -12,6 +12,13 @@
  	  Awk is used as a pattern scanning and processing language.  This is
  	  Awk is used as a pattern scanning and processing language.  This is
  	  the BusyBox implementation of that programming language.
  	  the BusyBox implementation of that programming language.
@@ -1106,10 +1105,10 @@ Index: busybox-1.7.2/editors/Config.in
  config FEATURE_AWK_MATH
  config FEATURE_AWK_MATH
  	bool "Enable math functions (requires libm)"
  	bool "Enable math functions (requires libm)"
  	default y
  	default y
-Index: busybox-1.7.2/editors/Kbuild
+Index: busybox-1.8.1/editors/Kbuild
 ===================================================================
 ===================================================================
---- busybox-1.7.2.orig/editors/Kbuild	2007-10-30 15:34:59.000000000 -0500
-+++ busybox-1.7.2/editors/Kbuild	2007-10-30 15:35:06.000000000 -0500
+--- busybox-1.8.1.orig/editors/Kbuild	2007-11-10 02:40:54.000000000 +0100
++++ busybox-1.8.1/editors/Kbuild	2007-11-10 17:06:19.278569448 +0100
 @@ -12,3 +12,12 @@
 @@ -12,3 +12,12 @@
  lib-$(CONFIG_PATCH)     += patch.o
  lib-$(CONFIG_PATCH)     += patch.o
  lib-$(CONFIG_SED)       += sed.o
  lib-$(CONFIG_SED)       += sed.o
@@ -1123,11 +1122,11 @@ Index: busybox-1.7.2/editors/Kbuild
 +editors/awx_parser.o: editors/awx_parser.c FORCE
 +editors/awx_parser.o: editors/awx_parser.c FORCE
 +	$(call cmd,force_checksrc)
 +	$(call cmd,force_checksrc)
 +	$(call if_changed_rule,cc_o_c)
 +	$(call if_changed_rule,cc_o_c)
-Index: busybox-1.7.2/include/applets.h
+Index: busybox-1.8.1/include/applets.h
 ===================================================================
 ===================================================================
---- busybox-1.7.2.orig/include/applets.h	2007-10-30 15:35:05.000000000 -0500
-+++ busybox-1.7.2/include/applets.h	2007-10-30 15:35:06.000000000 -0500
-@@ -76,6 +76,7 @@
+--- busybox-1.8.1.orig/include/applets.h	2007-11-10 17:03:38.957433264 +0100
++++ busybox-1.8.1/include/applets.h	2007-11-10 17:06:19.282569674 +0100
+@@ -83,6 +83,7 @@
  USE_ARPING(APPLET(arping, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
  USE_ARPING(APPLET(arping, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
  USE_ASH(APPLET_NOUSAGE(ash, ash, _BB_DIR_BIN, _BB_SUID_NEVER))
  USE_ASH(APPLET_NOUSAGE(ash, ash, _BB_DIR_BIN, _BB_SUID_NEVER))
  USE_AWK(APPLET_NOEXEC(awk, awk, _BB_DIR_USR_BIN, _BB_SUID_NEVER, awk))
  USE_AWK(APPLET_NOEXEC(awk, awk, _BB_DIR_USR_BIN, _BB_SUID_NEVER, awk))
@@ -1135,10 +1134,10 @@ Index: busybox-1.7.2/include/applets.h
  USE_BASENAME(APPLET_NOFORK(basename, basename, _BB_DIR_USR_BIN, _BB_SUID_NEVER, basename))
  USE_BASENAME(APPLET_NOFORK(basename, basename, _BB_DIR_USR_BIN, _BB_SUID_NEVER, basename))
  USE_BBCONFIG(APPLET(bbconfig, _BB_DIR_BIN, _BB_SUID_NEVER))
  USE_BBCONFIG(APPLET(bbconfig, _BB_DIR_BIN, _BB_SUID_NEVER))
  //USE_BBSH(APPLET(bbsh, _BB_DIR_BIN, _BB_SUID_NEVER))
  //USE_BBSH(APPLET(bbsh, _BB_DIR_BIN, _BB_SUID_NEVER))
-Index: busybox-1.7.2/include/cgi.h
+Index: busybox-1.8.1/include/cgi.h
 ===================================================================
 ===================================================================
 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ busybox-1.7.2/include/cgi.h	2007-10-30 15:35:06.000000000 -0500
++++ busybox-1.8.1/include/cgi.h	2007-11-10 17:06:19.282569674 +0100
 @@ -0,0 +1,8 @@
 @@ -0,0 +1,8 @@
 +#ifndef CGI_H
 +#ifndef CGI_H
 +#define CGI_H
 +#define CGI_H
@@ -1148,10 +1147,10 @@ Index: busybox-1.7.2/include/cgi.h
 +int cgi_init(var_handler);
 +int cgi_init(var_handler);
 +
 +
 +#endif
 +#endif
-Index: busybox-1.7.2/libbb/cgi.c
+Index: busybox-1.8.1/libbb/cgi.c
 ===================================================================
 ===================================================================
 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ busybox-1.7.2/libbb/cgi.c	2007-10-30 15:35:06.000000000 -0500
++++ busybox-1.8.1/libbb/cgi.c	2007-11-10 17:06:19.282569674 +0100
 @@ -0,0 +1,457 @@
 @@ -0,0 +1,457 @@
 +/* --------------------------------------------------------------------------
 +/* --------------------------------------------------------------------------
 + * functions for processing cgi form data
 + * functions for processing cgi form data
@@ -1610,11 +1609,11 @@ Index: busybox-1.7.2/libbb/cgi.c
 +
 +
 +	return retval;
 +	return retval;
 +} 
 +} 
-Index: busybox-1.7.2/libbb/Kbuild
+Index: busybox-1.8.1/libbb/Kbuild
 ===================================================================
 ===================================================================
---- busybox-1.7.2.orig/libbb/Kbuild	2007-10-30 15:35:06.000000000 -0500
-+++ busybox-1.7.2/libbb/Kbuild	2007-10-30 15:35:06.000000000 -0500
-@@ -99,6 +99,7 @@
+--- busybox-1.8.1.orig/libbb/Kbuild	2007-11-10 17:04:07.547062497 +0100
++++ busybox-1.8.1/libbb/Kbuild	2007-11-10 17:06:19.282569674 +0100
+@@ -101,6 +101,7 @@
  lib-y += xreadlink.o
  lib-y += xreadlink.o
  
  
  # conditionally compiled objects:
  # conditionally compiled objects:

+ 0 - 41
package/busybox/patches/990-upstream_tail_fix.patch

@@ -1,41 +0,0 @@
-Index: busybox-1.7.2/coreutils/tail.c
-===================================================================
---- busybox-1.7.2.orig/coreutils/tail.c	2007-10-30 15:34:59.000000000 -0500
-+++ busybox-1.7.2/coreutils/tail.c	2007-10-30 15:35:06.000000000 -0500
-@@ -47,13 +47,16 @@
- static ssize_t tail_read(int fd, char *buf, size_t count)
- {
- 	ssize_t r;
--	off_t current, end;
-+	off_t current;
- 	struct stat sbuf;
- 
--	end = current = lseek(fd, 0, SEEK_CUR);
--	if (!fstat(fd, &sbuf))
--		end = sbuf.st_size;
--	lseek(fd, end < current ? 0 : current, SEEK_SET);
-+	/* (A good comment is missing here) */
-+	current = lseek(fd, 0, SEEK_CUR);
-+	/* /proc files report zero st_size, don't lseek them. */
-+	if (fstat(fd, &sbuf) == 0 && sbuf.st_size)
-+		if (sbuf.st_size < current)
-+			lseek(fd, 0, SEEK_SET);
-+
- 	r = safe_read(fd, buf, count);
- 	if (r < 0) {
- 		bb_perror_msg(bb_msg_read_error);
-@@ -67,8 +70,12 @@
- 
- static unsigned eat_num(const char *p)
- {
--	if (*p == '-') p++;
--	else if (*p == '+') { p++; G.status = EXIT_FAILURE; }
-+	if (*p == '-')
-+		p++;
-+	else if (*p == '+') {
-+		p++;
-+		G.status = EXIT_FAILURE;
-+	}
- 	return xatou_sfx(p, tail_suffixes);
- }
- 

+ 0 - 27
package/busybox/patches/991-upstream_logger_fix.patch

@@ -1,27 +0,0 @@
-Index: busybox-1.7.2/sysklogd/logger.c
-===================================================================
---- busybox-1.7.2.orig/sysklogd/logger.c	2007-10-30 15:34:59.000000000 -0500
-+++ busybox-1.7.2/sysklogd/logger.c	2007-10-30 15:35:07.000000000 -0500
-@@ -107,7 +107,7 @@
- 	argv += optind;
- 	if (!argc) {
- #define strbuf bb_common_bufsiz1
--		while (fgets(strbuf, BUFSIZ, stdin)) {
-+		while (fgets(strbuf, COMMON_BUFSIZE, stdin)) {
- 			if (strbuf[0]
- 			 && NOT_LONE_CHAR(strbuf, '\n')
- 			) {
-@@ -117,11 +117,11 @@
- 		}
- 	} else {
- 		char *message = NULL;
--		int len = 1; /* for NUL */
-+		int len = 0;
- 		int pos = 0;
- 		do {
- 			len += strlen(*argv) + 1;
--			message = xrealloc(message, len);
-+			message = xrealloc(message, len + 1);
- 			sprintf(message + pos, " %s", *argv),
- 			pos = len;
- 		} while (*++argv);

Некоторые файлы не были показаны из-за большого количества измененных файлов