summaryrefslogtreecommitdiff
path: root/package/busybox
diff options
context:
space:
mode:
authornico <nico@3c298f89-4303-0410-b956-a3cf2f4a3e73>2006-12-30 19:35:58 +0000
committernico <nico@3c298f89-4303-0410-b956-a3cf2f4a3e73>2006-12-30 19:35:58 +0000
commit4f17fe653b4bf22aa059b5f5fa5678ceebc18a67 (patch)
tree9521f2dc4c564fddfdc5ee8aaed16ec54dfa93bb /package/busybox
parent261aac942079aa99fec98168e204a0f8089c7d89 (diff)
update busybox to v1.3.1, i was too lazy to update patch 320, feel free to do so
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@5941 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/busybox')
-rw-r--r--package/busybox/Makefile15
-rw-r--r--package/busybox/patches/001-wget_long_options.patch22
-rw-r--r--package/busybox/patches/100-killall5.patch85
-rw-r--r--package/busybox/patches/110-no_shadow.patch12
-rw-r--r--package/busybox/patches/110-telnetd.patch51
-rw-r--r--package/busybox/patches/120-ping-no_warnings.patch24
-rw-r--r--package/busybox/patches/140-unlink-passwd.patch32
-rw-r--r--package/busybox/patches/150-udhcp-release.patch90
-rw-r--r--package/busybox/patches/170-udhcp-options.patch15
-rw-r--r--package/busybox/patches/180-telnetd_ipv6.patch12
-rw-r--r--package/busybox/patches/190-ash_performance.patch80
-rw-r--r--package/busybox/patches/210-passwd_limit.patch15
-rw-r--r--package/busybox/patches/220-awk_bitops.patch64
-rw-r--r--package/busybox/patches/230-grep_C.patch12
-rw-r--r--package/busybox/patches/241-udhcpc-oversized_packets.patch44
-rw-r--r--package/busybox/patches/300-netmsg.patch59
-rw-r--r--package/busybox/patches/310-passwd_access.patch74
-rw-r--r--package/busybox/patches/320-httpd_address_binding.patch95
-rw-r--r--package/busybox/patches/330-httpd_user_agent.patch46
-rw-r--r--package/busybox/patches/340-lock_util.patch53
-rw-r--r--package/busybox/patches/911-ipkg.patch771
-rw-r--r--package/busybox/patches/913-libbb_hash.patch118
22 files changed, 593 insertions, 1196 deletions
diff --git a/package/busybox/Makefile b/package/busybox/Makefile
index 0c1efc470a..2688777c00 100644
--- a/package/busybox/Makefile
+++ b/package/busybox/Makefile
@@ -9,12 +9,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=busybox
-PKG_VERSION:=1.2.1
+PKG_VERSION:=1.3.1
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=http://www.busybox.net/downloads
-PKG_MD5SUM:=362b3dc0f2023ddfda901dc1f1a74391
+PKG_MD5SUM:=571531cfa83726947ccb566de017ad4f
PKG_CAT:=bzcat
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
@@ -50,15 +50,17 @@ define Build/Configure
$(SCRIPT_DIR)/gen_busybox_config.pl $(TOPDIR)/.config > $(PKG_BUILD_DIR)/.config
yes '' | $(MAKE) -C $(PKG_BUILD_DIR) \
CC="$(TARGET_CC)" \
- CROSS="$(TARGET_CROSS)" \
+ CROSS_COMPILE="$(TARGET_CROSS)" \
+ ARCH="$(ARCH)" \
oldconfig
endef
define Build/Compile
$(MAKE) -C $(PKG_BUILD_DIR) \
CC="$(TARGET_CC)" \
- CROSS="$(TARGET_CROSS)" \
+ CROSS_COMPILE="$(TARGET_CROSS)" \
EXTRA_CFLAGS="$(TARGET_CFLAGS)" \
+ ARCH="$(ARCH)" \
IPKG_ARCH="$(ARCH)" \
all
endef
@@ -66,10 +68,11 @@ endef
define Package/busybox/install
$(MAKE) -C $(PKG_BUILD_DIR) \
CC="$(TARGET_CC)" \
- CROSS="$(TARGET_CROSS)" \
+ CROSS_COMPILE="$(TARGET_CROSS)" \
EXTRA_CFLAGS="$(TARGET_CFLAGS)" \
+ ARCH="$(ARCH)" \
IPKG_ARCH="$(ARCH)" \
- PREFIX="$(1)" \
+ CONFIG_PREFIX="$(1)" \
install
mkdir -p $(1)/etc/init.d
for tmp in $(init-y); do \
diff --git a/package/busybox/patches/001-wget_long_options.patch b/package/busybox/patches/001-wget_long_options.patch
deleted file mode 100644
index 9538427e3e..0000000000
--- a/package/busybox/patches/001-wget_long_options.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-Index: busybox-CURRENT/networking/wget.c
-===================================================================
---- busybox-CURRENT/networking/wget.c (revision 15806)
-+++ busybox-CURRENT/networking/wget.c (working copy)
-@@ -133,7 +133,7 @@
- #define WGET_OPT_PREFIX 32
- #define WGET_OPT_PROXY 64
-
--#if ENABLE_WGET_LONG_OPTIONS
-+#if CONFIG_FEATURE_WGET_LONG_OPTIONS
- static const struct option wget_long_options[] = {
- { "continue", 0, NULL, 'c' },
- { "quiet", 0, NULL, 'q' },
-@@ -177,7 +177,7 @@
- * Crack command line.
- */
- bb_opt_complementally = "-1:\203::";
--#if ENABLE_WGET_LONG_OPTIONS
-+#if CONFIG_FEATURE_WGET_LONG_OPTIONS
- bb_applet_long_options = wget_long_options;
- #endif
- opt = bb_getopt_ulflags(argc, argv, "cq\213O:\203:P:Y:",
diff --git a/package/busybox/patches/100-killall5.patch b/package/busybox/patches/100-killall5.patch
deleted file mode 100644
index 9828224800..0000000000
--- a/package/busybox/patches/100-killall5.patch
+++ /dev/null
@@ -1,85 +0,0 @@
-diff -ruN busybox-1.2.0-old/include/applets.h busybox-1.2.0-new/include/applets.h
---- busybox-1.2.0-old/include/applets.h 2006-07-01 00:42:10.000000000 +0200
-+++ busybox-1.2.0-new/include/applets.h 2006-07-31 00:29:34.000000000 +0200
-@@ -157,6 +157,7 @@
- USE_IPTUNNEL(APPLET(iptunnel, _BB_DIR_BIN, _BB_SUID_NEVER))
- USE_KILL(APPLET(kill, _BB_DIR_BIN, _BB_SUID_NEVER))
- USE_KILLALL(APPLET_ODDNAME(killall, kill, _BB_DIR_USR_BIN, _BB_SUID_NEVER, killall))
-+USE_KILLALL5(APPLET_ODDNAME(killall5, kill, _BB_DIR_USR_BIN, _BB_SUID_NEVER, killall5))
- USE_KLOGD(APPLET(klogd, _BB_DIR_SBIN, _BB_SUID_NEVER))
- USE_LASH(APPLET(lash, _BB_DIR_BIN, _BB_SUID_NEVER))
- USE_LAST(APPLET(last, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-diff -ruN busybox-1.2.0-old/include/usage.h busybox-1.2.0-new/include/usage.h
---- busybox-1.2.0-old/include/usage.h 2006-07-01 00:42:10.000000000 +0200
-+++ busybox-1.2.0-new/include/usage.h 2006-07-31 00:25:57.000000000 +0200
-@@ -1503,6 +1503,13 @@
- #define killall_example_usage \
- "$ killall apache\n"
-
-+#define killall5_trivial_usage \
-+ ""
-+#define killall5_full_usage \
-+ ""
-+#define killall5_example_usage \
-+ ""
-+
- #define klogd_trivial_usage \
- "[-c n] [-n]"
- #define klogd_full_usage \
-diff -ruN busybox-1.2.0-old/procps/Config.in busybox-1.2.0-new/procps/Config.in
---- busybox-1.2.0-old/procps/Config.in 2006-07-01 00:42:12.000000000 +0200
-+++ busybox-1.2.0-new/procps/Config.in 2006-07-31 00:25:57.000000000 +0200
-@@ -38,6 +38,11 @@
- specified commands. If no signal name is specified, SIGTERM is
- sent.
-
-+config CONFIG_KILLALL5
-+ bool "killall5"
-+ default n
-+ depends on CONFIG_KILL
-+
- config CONFIG_PIDOF
- bool "pidof"
- default n
-diff -ruN busybox-1.2.0-old/procps/kill.c busybox-1.2.0-new/procps/kill.c
---- busybox-1.2.0-old/procps/kill.c 2006-07-01 00:42:12.000000000 +0200
-+++ busybox-1.2.0-new/procps/kill.c 2006-07-31 00:25:57.000000000 +0200
-@@ -20,6 +20,7 @@
-
- #define KILL 0
- #define KILLALL 1
-+#define KILLALL5 2
-
- int kill_main(int argc, char **argv)
- {
-@@ -34,6 +35,9 @@
- #else
- whichApp = KILL;
- #endif
-+#ifdef CONFIG_KILLALL5
-+ whichApp = (strcmp(bb_applet_name, "killall5") == 0)? KILLALL5 : whichApp;
-+#endif
-
- /* Parse any options */
- if (argc < 2)
-@@ -112,6 +116,20 @@
- }
-
- }
-+#ifdef CONFIG_KILLALL5
-+ else if (whichApp == KILLALL5) {
-+ procps_status_t * p;
-+ pid_t myPid=getpid();
-+ while ((p = procps_scan(0)) != 0) {
-+ if (p->pid != 1 && p->pid != myPid && p->pid != p->ppid) {
-+ if (kill(p->pid, signo) != 0) {
-+ bb_perror_msg( "Could not kill pid '%d'", p->pid);
-+ errors++;
-+ }
-+ }
-+ }
-+ }
-+#endif
- #ifdef CONFIG_KILLALL
- else {
- pid_t myPid=getpid();
diff --git a/package/busybox/patches/110-no_shadow.patch b/package/busybox/patches/110-no_shadow.patch
new file mode 100644
index 0000000000..ef873c1def
--- /dev/null
+++ b/package/busybox/patches/110-no_shadow.patch
@@ -0,0 +1,12 @@
+--- busybox-1.3.1-old/include/libbb.h 2006-12-27 05:56:18.000000000 +0100
++++ busybox-1.3.1/include/libbb.h 2006-12-28 07:08:09.000000000 +0100
+@@ -51,9 +51,7 @@
+
+ #include "pwd_.h"
+ #include "grp_.h"
+-#if ENABLE_FEATURE_SHADOWPASSWDS
+ #include "shadow_.h"
+-#endif
+
+ /* Try to pull in PATH_MAX */
+ #include <limits.h>
diff --git a/package/busybox/patches/110-telnetd.patch b/package/busybox/patches/110-telnetd.patch
deleted file mode 100644
index 8ebb6de645..0000000000
--- a/package/busybox/patches/110-telnetd.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-diff -ruN busybox-1.2.0-old/networking/telnetd.c busybox-1.2.0-new/networking/telnetd.c
---- busybox-1.2.0-old/networking/telnetd.c 2006-07-01 00:42:02.000000000 +0200
-+++ busybox-1.2.0-new/networking/telnetd.c 2006-07-31 10:52:30.000000000 +0200
-@@ -44,6 +44,7 @@
- #include <arpa/telnet.h>
- #include <ctype.h>
- #include <sys/syslog.h>
-+#include <net/if.h>
-
- #include "busybox.h"
-
-@@ -391,11 +392,13 @@
- struct in_addr bind_addr = { .s_addr = 0x0 };
- #endif /* CONFIG_FEATURE_TELNETD_INETD */
- int c;
-+ char *interface_name = NULL;
-+ struct ifreq interface;
- static const char options[] =
- #ifdef CONFIG_FEATURE_TELNETD_INETD
-- "f:l:";
-+ "i:f:l:";
- #else /* CONFIG_EATURE_TELNETD_INETD */
-- "f:l:p:b:";
-+ "i:f:l:p:b:";
- #endif /* CONFIG_FEATURE_TELNETD_INETD */
- int maxlen, w, r;
-
-@@ -410,6 +413,9 @@
- case 'f':
- issuefile = optarg;
- break;
-+ case 'i':
-+ interface_name = strdup(optarg);
-+ break;
- case 'l':
- loginpath = optarg;
- break;
-@@ -459,6 +465,13 @@
- sa.sin_addr = bind_addr;
- #endif
-
-+ /* Set it to listen on the specified interface */
-+ if (interface_name) {
-+ strncpy(interface.ifr_ifrn.ifrn_name, interface_name, IFNAMSIZ);
-+ (void)setsockopt(master_fd, SOL_SOCKET,
-+ SO_BINDTODEVICE, &interface, sizeof(interface));
-+ }
-+
- bb_xbind(master_fd, (struct sockaddr *) &sa, sizeof(sa));
- bb_xlisten(master_fd, 1);
- bb_xdaemon(0, 0);
diff --git a/package/busybox/patches/120-ping-no_warnings.patch b/package/busybox/patches/120-ping-no_warnings.patch
new file mode 100644
index 0000000000..5c072ba1d1
--- /dev/null
+++ b/package/busybox/patches/120-ping-no_warnings.patch
@@ -0,0 +1,24 @@
+--- busybox-1.3.1/networking/ping.c 2006-12-27 05:52:39.000000000 +0100
++++ busybox-1.3.1-new/networking/ping.c 2006-12-29 18:42:36.000000000 +0100
+@@ -217,7 +217,8 @@
+ pkt->icmp_type = ICMP_ECHO;
+ pkt->icmp_code = 0;
+ pkt->icmp_cksum = 0;
+- pkt->icmp_seq = htons(ntransmitted++);
++ pkt->icmp_seq = htons(ntransmitted);
++ ntransmitted++;
+ pkt->icmp_id = myid;
+ CLR(ntohs(pkt->icmp_seq) % MAX_DUP_CHK);
+
+--- busybox-1.3.1/networking/ping6.c 2006-12-27 05:52:39.000000000 +0100
++++ busybox-1.3.1-new/networking/ping6.c 2006-12-29 18:44:02.000000000 +0100
+@@ -205,7 +205,8 @@
+ pkt->icmp6_type = ICMP6_ECHO_REQUEST;
+ pkt->icmp6_code = 0;
+ pkt->icmp6_cksum = 0;
+- pkt->icmp6_seq = htons(ntransmitted++);
++ pkt->icmp6_seq = htons(ntransmitted);
++ ntransmitted++;
+ pkt->icmp6_id = myid;
+ CLR(pkt->icmp6_seq % MAX_DUP_CHK);
+
diff --git a/package/busybox/patches/140-unlink-passwd.patch b/package/busybox/patches/140-unlink-passwd.patch
deleted file mode 100644
index 07b6767e6e..0000000000
--- a/package/busybox/patches/140-unlink-passwd.patch
+++ /dev/null
@@ -1,32 +0,0 @@
---- busybox-1.00.old/loginutils/passwd.c 2004-09-15 04:39:09.000000000 +0200
-+++ busybox-1.00/loginutils/passwd.c 2005-03-23 15:31:07.000000000 +0100
-@@ -54,11 +54,12 @@
- snprintf(filename, sizeof filename, "%s", bb_path_passwd_file);
- }
-
-- if (((fp = fopen(filename, "r+")) == 0) || (fstat(fileno(fp), &sb))) {
-+ if (((fp = fopen(filename, "r")) == 0) || (fstat(fileno(fp), &sb))) {
- /* return 0; */
- return 1;
- }
-
-+#if 0
- /* Lock the password file before updating */
- lock.l_type = F_WRLCK;
- lock.l_whence = SEEK_SET;
-@@ -69,6 +70,7 @@
- return 1;
- }
- lock.l_type = F_UNLCK;
-+#endif
-
- snprintf(buf, sizeof buf, "%s-", filename);
- if (create_backup(buf, fp)) {
-@@ -119,6 +121,7 @@
- fclose(fp);
- return 1;
- }
-+ unlink(filename);
- if (rename(buf, filename) < 0) {
- fcntl(fileno(fp), F_SETLK, &lock);
- fclose(fp);
diff --git a/package/busybox/patches/150-udhcp-release.patch b/package/busybox/patches/150-udhcp-release.patch
deleted file mode 100644
index 1e1c00ef29..0000000000
--- a/package/busybox/patches/150-udhcp-release.patch
+++ /dev/null
@@ -1,90 +0,0 @@
-diff -ruN busybox-1.2.0-old/include/usage.h busybox-1.2.0-new/include/usage.h
---- busybox-1.2.0-old/include/usage.h 2006-07-31 10:47:56.000000000 +0200
-+++ busybox-1.2.0-new/include/usage.h 2006-07-31 11:08:49.000000000 +0200
-@@ -3190,6 +3190,7 @@
- "\t-n,\t--now\tExit with failure if lease cannot be immediately negotiated\n" \
- "\t-p,\t--pidfile=file\tStore process ID of daemon in file\n" \
- "\t-q,\t--quit\tQuit after obtaining lease\n" \
-+ "\t-R,\t--release\tRelease IP on quit\n" \
- "\t-r,\t--request=IP\tIP address to request (default: none)\n" \
- "\t-s,\t--script=file\tRun file at dhcp events (default: /usr/share/udhcpc/default.script)\n" \
- "\t-t,\t--retries=NUM\tSend up to NUM request packets\n"\
-diff -ruN busybox-1.2.0-old/networking/udhcp/dhcpc.c busybox-1.2.0-new/networking/udhcp/dhcpc.c
---- busybox-1.2.0-old/networking/udhcp/dhcpc.c 2006-07-01 00:42:02.000000000 +0200
-+++ busybox-1.2.0-new/networking/udhcp/dhcpc.c 2006-07-31 11:08:49.000000000 +0200
-@@ -47,6 +47,7 @@
- .abort_if_no_lease = 0,
- .foreground = 0,
- .quit_after_lease = 0,
-+ .release_on_quit = 0,
- .background_if_no_lease = 0,
- .interface = "eth0",
- .pidfile = NULL,
-@@ -163,6 +164,7 @@
- {"now", no_argument, 0, 'n'},
- {"pidfile", required_argument, 0, 'p'},
- {"quit", no_argument, 0, 'q'},
-+ {"release", no_argument, 0, 'R'},
- {"request", required_argument, 0, 'r'},
- {"script", required_argument, 0, 's'},
- {"timeout", required_argument, 0, 'T'},
-@@ -174,7 +176,7 @@
- /* get options */
- while (1) {
- int option_index = 0;
-- c = getopt_long(argc, argv, "c:CV:fbH:h:F:i:np:qr:s:T:t:v", arg_options, &option_index);
-+ c = getopt_long(argc, argv, "c:CV:fbH:h:F:i:np:qRr:s:T:t:v", arg_options, &option_index);
- if (c == -1) break;
-
- switch (c) {
-@@ -244,6 +246,9 @@
- case 'q':
- client_config.quit_after_lease = 1;
- break;
-+ case 'R':
-+ client_config.release_on_quit = 1;
-+ break;
- case 'r':
- requested_ip = inet_addr(optarg);
- break;
-@@ -488,8 +493,11 @@
-
- state = BOUND;
- change_mode(LISTEN_NONE);
-- if (client_config.quit_after_lease)
-+ if (client_config.quit_after_lease) {
-+ if (client_config.release_on_quit)
-+ perform_release();
- return 0;
-+ }
- if (!client_config.foreground)
- client_background();
-
-@@ -514,12 +522,13 @@
- case SIGUSR1:
- perform_renew();
- break;
-- case SIGUSR2:
-- perform_release();
-- break;
- case SIGTERM:
- LOG(LOG_INFO, "Received SIGTERM");
-+ if (!client_config.release_on_quit)
- return 0;
-+ case SIGUSR2:
-+ perform_release();
-+ break;
- }
- } else if (retval == -1 && errno == EINTR) {
- /* a signal was caught */
-diff -ruN busybox-1.2.0-old/networking/udhcp/dhcpc.h busybox-1.2.0-new/networking/udhcp/dhcpc.h
---- busybox-1.2.0-old/networking/udhcp/dhcpc.h 2006-07-01 00:42:02.000000000 +0200
-+++ busybox-1.2.0-new/networking/udhcp/dhcpc.h 2006-07-31 11:08:49.000000000 +0200
-@@ -18,6 +18,7 @@
- struct client_config_t {
- char foreground; /* Do not fork */
- char quit_after_lease; /* Quit after obtaining lease */
-+ char release_on_quit; /* perform release on quit */
- char abort_if_no_lease; /* Abort if no lease */
- char background_if_no_lease; /* Fork to background if no lease */
- char *interface; /* The name of the interface to use */
diff --git a/package/busybox/patches/170-udhcp-options.patch b/package/busybox/patches/170-udhcp-options.patch
deleted file mode 100644
index b03810adf5..0000000000
--- a/package/busybox/patches/170-udhcp-options.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-diff -Nur busybox-1.00.orig/networking/udhcp/options.c busybox-1.00/networking/udhcp/options.c
---- busybox-1.00.orig/networking/udhcp/options.c 2004-03-15 09:29:01.000000000 +0100
-+++ busybox-1.00/networking/udhcp/options.c 2005-09-14 13:27:23.792609800 +0200
-@@ -39,8 +39,11 @@
- {"dhcptype", OPTION_U8, 0x35},
- {"serverid", OPTION_IP, 0x36},
- {"message", OPTION_STRING, 0x38},
-+ {"vendorclass", OPTION_STRING, 0x3C},
-+ {"clientid", OPTION_STRING, 0x3D},
- {"tftp", OPTION_STRING, 0x42},
- {"bootfile", OPTION_STRING, 0x43},
-+ {"userclass", OPTION_STRING, 0x4D},
- {"", 0x00, 0x00}
- };
-
diff --git a/package/busybox/patches/180-telnetd_ipv6.patch b/package/busybox/patches/180-telnetd_ipv6.patch
deleted file mode 100644
index fb8df6fa92..0000000000
--- a/package/busybox/patches/180-telnetd_ipv6.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -urN busybox.old/networking/telnetd.c busybox.dev/networking/telnetd.c
---- busybox.old/networking/telnetd.c 2005-08-17 03:29:10.000000000 +0200
-+++ busybox.dev/networking/telnetd.c 2005-10-22 19:37:49.976396000 +0200
-@@ -49,6 +49,8 @@
-
- #define BUFSIZE 4000
-
-+#undef CONFIG_FEATURE_IPV6
-+
- #ifdef CONFIG_FEATURE_IPV6
- #define SOCKET_TYPE AF_INET6
- typedef struct sockaddr_in6 sockaddr_type;
diff --git a/package/busybox/patches/190-ash_performance.patch b/package/busybox/patches/190-ash_performance.patch
deleted file mode 100644
index 0931931419..0000000000
--- a/package/busybox/patches/190-ash_performance.patch
+++ /dev/null
@@ -1,80 +0,0 @@
-
- Copyright (C) 2006 OpenWrt.org
-
-diff -urN busybox.old/shell/ash.c busybox.dev/shell/ash.c
---- busybox.old/shell/ash.c 2005-11-12 22:39:19.853826250 +0100
-+++ busybox.dev/shell/ash.c 2005-11-12 22:39:42.771258500 +0100
-@@ -1414,6 +1414,13 @@
-
- #define NUMBUILTINS (sizeof (builtincmd) / sizeof (struct builtincmd) )
-
-+static const char *safe_applets[] = {
-+ "[", "test", "echo", "cat",
-+ "ln", "cp", "touch", "mkdir", "rm",
-+ "cut", "hexdump", "awk", "sort",
-+ "find", "xargs", "ls", "dd",
-+ "chown", "chmod"
-+};
-
-
- struct cmdentry {
-@@ -2050,6 +2057,19 @@
- static void exitshell(void) __attribute__((__noreturn__));
- static int decode_signal(const char *, int);
-
-+
-+static int is_safe_applet(char *name)
-+{
-+ int n = sizeof(safe_applets) / sizeof(char *);
-+ int i;
-+ for (i = 0; i < n; i++)
-+ if (strcmp(safe_applets[i], name) == 0)
-+ return 1;
-+
-+ return 0;
-+}
-+
-+
- /*
- * This routine is called when an error or an interrupt occurs in an
- * interactive shell and control is returned to the main command loop.
-@@ -3680,6 +3700,7 @@
- clearredir(1);
- envp = environment();
- if (strchr(argv[0], '/') != NULL
-+ || is_safe_applet(argv[0])
- #ifdef CONFIG_FEATURE_SH_STANDALONE_SHELL
- || find_applet_by_name(argv[0])
- #endif
-@@ -3721,6 +3742,18 @@
- tryexec(char *cmd, char **argv, char **envp)
- {
- int repeated = 0;
-+ struct BB_applet *a;
-+ int argc = 0;
-+ char **c;
-+
-+ if(strchr(cmd, '/') == NULL && is_safe_applet(cmd) && (a = find_applet_by_name(cmd)) != NULL) {
-+ c = argv;
-+ while (*c != NULL) {
-+ c++; argc++;
-+ }
-+ bb_applet_name = cmd;
-+ exit(a->main(argc, argv));
-+ }
- #ifdef CONFIG_FEATURE_SH_STANDALONE_SHELL
- int flg_bb = 0;
- char *name = cmd;
-@@ -3919,6 +3952,12 @@
- }
- #endif
-
-+ if (is_safe_applet(name)) {
-+ entry->cmdtype = CMDNORMAL;
-+ entry->u.index = -1;
-+ return;
-+ }
-+
- updatetbl = (path == pathval());
- if (!updatetbl) {
- act |= DO_ALTPATH;
diff --git a/package/busybox/patches/210-passwd_limit.patch b/package/busybox/patches/210-passwd_limit.patch
deleted file mode 100644
index 6c10916b4a..0000000000
--- a/package/busybox/patches/210-passwd_limit.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-
- Copyright (C) 2006 OpenWrt.org
-
-diff -urN busybox.old/loginutils/passwd.c busybox.dev/loginutils/passwd.c
---- busybox.old/loginutils/passwd.c 2005-12-11 22:52:46.185150000 +0100
-+++ busybox.dev/loginutils/passwd.c 2005-12-11 23:19:15.276596500 +0100
-@@ -353,7 +353,7 @@
- } else {
- orig[0] = '\0';
- }
-- if (! (cp=bb_askpass(0, "Enter the new password (minimum of 5, maximum of 8 characters)\n"
-+ if (! (cp=bb_askpass(0, "Enter the new password (minimum of 5 characters)\n"
- "Please use a combination of upper and lower case letters and numbers.\n"
- "Enter new password: ")))
- {
diff --git a/package/busybox/patches/220-awk_bitops.patch b/package/busybox/patches/220-awk_bitops.patch
deleted file mode 100644
index 1567583d2a..0000000000
--- a/package/busybox/patches/220-awk_bitops.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-
- Copyright (C) 2006 OpenWrt.org
-
---- busybox-1.00/editors/awk.c.orig 2004-09-24 05:24:27 -04:00
-+++ busybox-1.00/editors/awk.c 2006-03-08 02:16:52 -05:00
-@@ -271,7 +271,8 @@
- /* builtins */
- enum {
- B_a2=0, B_ix, B_ma, B_sp, B_ss, B_ti, B_lo, B_up,
-- B_ge, B_gs, B_su
-+ B_ge, B_gs, B_su,
-+ B_an, B_co, B_ls, B_or, B_rs, B_xo,
- };
-
- /* tokens and their corresponding info values */
-@@ -311,6 +312,8 @@
- "\5while" NTC
- "\4else" NTC
-
-+ "\3and" "\5compl" "\6lshift" "\2or"
-+ "\6rshift" "\3xor"
- "\5close" "\6system" "\6fflush" "\5atan2" /* BUILTIN */
- "\3cos" "\3exp" "\3int" "\3log"
- "\4rand" "\3sin" "\4sqrt" "\5srand"
-@@ -364,6 +367,8 @@
- ST_WHILE,
- 0,
-
-+ OC_B|B_an|P(0x83), OC_B|B_co|P(0x41), OC_B|B_ls|P(0x83), OC_B|B_or|P(0x83),
-+ OC_B|B_rs|P(0x83), OC_B|B_xo|P(0x83),
- OC_FBLTIN|Sx|F_cl, OC_FBLTIN|Sx|F_sy, OC_FBLTIN|Sx|F_ff, OC_B|B_a2|P(0x83),
- OC_FBLTIN|Nx|F_co, OC_FBLTIN|Nx|F_ex, OC_FBLTIN|Nx|F_in, OC_FBLTIN|Nx|F_lg,
- OC_FBLTIN|F_rn, OC_FBLTIN|Nx|F_si, OC_FBLTIN|Nx|F_sq, OC_FBLTIN|Nx|F_sr,
-@@ -1942,6 +1947,30 @@
- strncpy(s, as[0]+i, n);
- s[n] = '\0';
- setvar_p(res, s);
-+ break;
-+
-+ case B_an:
-+ setvar_i(res, (long)getvar_i(av[0]) & (long)getvar_i(av[1]));
-+ break;
-+
-+ case B_co:
-+ setvar_i(res, ~(long)getvar_i(av[0]));
-+ break;
-+
-+ case B_ls:
-+ setvar_i(res, (long)getvar_i(av[0]) << (long)getvar_i(av[1]));
-+ break;
-+
-+ case B_or:
-+ setvar_i(res, (long)getvar_i(av[0]) | (long)getvar_i(av[1]));
-+ break;
-+
-+ case B_rs:
-+ setvar_i(res, (long)((unsigned long)getvar_i(av[0]) >> (unsigned long)getvar_i(av[1])));
-+ break;
-+
-+ case B_xo:
-+ setvar_i(res, (long)getvar_i(av[0]) ^ (long)getvar_i(av[1]));
- break;
-
- case B_lo:
diff --git a/package/busybox/patches/230-grep_C.patch b/package/busybox/patches/230-grep_C.patch
deleted file mode 100644
index 08d76738b3..0000000000
--- a/package/busybox/patches/230-grep_C.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -Nur busybox-1.2.1/findutils/grep.c busybox-1.2.1/findutils/grep.c
---- busybox-1.2.1/findutils/grep.c 2006-09-25 14:47:51.000000000 -0700
-+++ busybox-1.2.1/findutils/grep.c 2006-09-25 14:39:39.000000000 -0700
-@@ -51,7 +51,7 @@
- #define GREP_OPT_L (1<<12)
- #define PRINT_FILES_WITHOUT_MATCHES ((opt & GREP_OPT_L) != 0)
- #if ENABLE_FEATURE_GREP_CONTEXT
--#define GREP_OPT_CONTEXT "A:B:C"
-+#define GREP_OPT_CONTEXT "A:B:C:"
- #define GREP_OPT_A (1<<13)
- #define GREP_OPT_B (1<<14)
- #define GREP_OPT_C (1<<15)
diff --git a/package/busybox/patches/241-udhcpc-oversized_packets.patch b/package/busybox/patches/241-udhcpc-oversized_packets.patch
index d041bf5c3f..d324d752d8 100644
--- a/package/busybox/patches/241-udhcpc-oversized_packets.patch
+++ b/package/busybox/patches/241-udhcpc-oversized_packets.patch
@@ -1,7 +1,7 @@
-diff -ruN busybox-1.2.1-old/networking/udhcp/packet.c busybox-1.2.1-new/networking/udhcp/packet.c
---- busybox-1.2.1-old/networking/udhcp/packet.c 2006-07-01 00:42:02.000000000 +0200
-+++ busybox-1.2.1-new/networking/udhcp/packet.c 2006-11-19 01:04:40.000000000 +0100
-@@ -111,6 +111,10 @@
+diff -ruN busybox-1.3.1-old/networking/udhcp/packet.c busybox-1.3.1/networking/udhcp/packet.c
+--- busybox-1.3.1-old/networking/udhcp/packet.c 2006-12-27 05:52:33.000000000 +0100
++++ busybox-1.3.1/networking/udhcp/packet.c 2006-12-28 05:38:36.000000000 +0100
+@@ -107,6 +107,10 @@
return ~sum;
}
@@ -11,16 +11,16 @@ diff -ruN busybox-1.2.1-old/networking/udhcp/packet.c busybox-1.2.1-new/networki
+}
/* Construct a ip/udp header for a packet, and specify the source and dest hardware address */
- int udhcp_raw_packet(struct dhcpMessage *payload, uint32_t source_ip, int source_port,
-@@ -120,6 +124,7 @@
+ void BUG_sizeof_struct_udp_dhcp_packet_must_be_576(void);
+@@ -118,6 +122,7 @@
int result;
struct sockaddr_ll dest;
struct udp_dhcp_packet packet;
+ int p_len = udhcp_get_payload_len(payload);
- if ((fd = socket(PF_PACKET, SOCK_DGRAM, htons(ETH_P_IP))) < 0) {
- DEBUG(LOG_ERR, "socket call failed: %m");
-@@ -128,6 +133,7 @@
+ fd = socket(PF_PACKET, SOCK_DGRAM, htons(ETH_P_IP));
+ if (fd < 0) {
+@@ -127,6 +132,7 @@
memset(&dest, 0, sizeof(dest));
memset(&packet, 0, sizeof(packet));
@@ -28,7 +28,7 @@ diff -ruN busybox-1.2.1-old/networking/udhcp/packet.c busybox-1.2.1-new/networki
dest.sll_family = AF_PACKET;
dest.sll_protocol = htons(ETH_P_IP);
-@@ -145,18 +151,19 @@
+@@ -144,12 +150,13 @@
packet.ip.daddr = dest_ip;
packet.udp.source = htons(source_port);
packet.udp.dest = htons(dest_port);
@@ -46,14 +46,16 @@ diff -ruN busybox-1.2.1-old/networking/udhcp/packet.c busybox-1.2.1-new/networki
packet.ip.ihl = sizeof(packet.ip) >> 2;
packet.ip.version = IPVERSION;
packet.ip.ttl = IPDEFTTL;
- packet.ip.check = udhcp_checksum(&(packet.ip), sizeof(packet.ip));
+@@ -158,7 +165,7 @@
+ if (sizeof(struct udp_dhcp_packet) != 576)
+ BUG_sizeof_struct_udp_dhcp_packet_must_be_576();
-- result = sendto(fd, &packet, sizeof(struct udp_dhcp_packet), 0, (struct sockaddr *) &dest, sizeof(dest));
-+ result = sendto(fd, &packet, p_len, 0, (struct sockaddr *) &dest, sizeof(dest));
+- result = sendto(fd, &packet, sizeof(struct udp_dhcp_packet), 0,
++ result = sendto(fd, &packet, p_len, 0,
+ (struct sockaddr *) &dest, sizeof(dest));
if (result <= 0) {
- DEBUG(LOG_ERR, "write on socket failed: %m");
- }
-@@ -201,7 +208,7 @@
+ bb_perror_msg("sendto");
+@@ -205,7 +212,7 @@
return -1;
}
@@ -62,10 +64,10 @@ diff -ruN busybox-1.2.1-old/networking/udhcp/packet.c busybox-1.2.1-new/networki
close(fd);
return result;
}
-diff -ruN busybox-1.2.1-old/networking/udhcp/packet.h busybox-1.2.1-new/networking/udhcp/packet.h
---- busybox-1.2.1-old/networking/udhcp/packet.h 2006-07-01 00:42:02.000000000 +0200
-+++ busybox-1.2.1-new/networking/udhcp/packet.h 2006-11-19 00:49:38.000000000 +0100
-@@ -4,6 +4,8 @@
+diff -ruN busybox-1.3.1-old/networking/udhcp/common.h busybox-1.3.1/networking/udhcp/common.h
+--- busybox-1.3.1-old/networking/udhcp/common.h 2006-12-27 05:52:33.000000000 +0100
++++ busybox-1.3.1/networking/udhcp/common.h 2006-12-28 05:17:06.000000000 +0100
+@@ -26,6 +26,8 @@
#include <netinet/udp.h>
#include <netinet/ip.h>
@@ -74,7 +76,7 @@ diff -ruN busybox-1.2.1-old/networking/udhcp/packet.h busybox-1.2.1-new/networki
struct dhcpMessage {
uint8_t op;
uint8_t htype;
-@@ -20,7 +22,7 @@
+@@ -42,7 +44,7 @@
uint8_t sname[64];
uint8_t file[128];
uint32_t cookie;
diff --git a/package/busybox/patches/300-netmsg.patch b/package/busybox/patches/300-netmsg.patch
index 428e321390..e51a8bb78b 100644
--- a/package/busybox/patches/300-netmsg.patch
+++ b/package/busybox/patches/300-netmsg.patch
@@ -1,49 +1,44 @@
-# Copyright (C) 2006 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-diff -ruN busybox-1.2.0-old/include/applets.h busybox-1.2.0-new/include/applets.h
---- busybox-1.2.0-old/include/applets.h 2006-07-31 10:47:56.000000000 +0200
-+++ busybox-1.2.0-new/include/applets.h 2006-07-31 11:21:00.000000000 +0200
-@@ -200,6 +200,7 @@
+diff -ruN busybox-1.3.1-old/include/applets.h busybox-1.3.1-new/include/applets.h
+--- busybox-1.3.1-old/include/applets.h 2006-12-27 05:56:18.000000000 +0100
++++ busybox-1.3.1-new/include/applets.h 2006-12-28 07:25:35.000000000 +0100
+@@ -211,6 +211,7 @@
USE_MV(APPLET(mv, _BB_DIR_BIN, _BB_SUID_NEVER))
USE_NAMEIF(APPLET(nameif, _BB_DIR_SBIN, _BB_SUID_NEVER))
USE_NC(APPLET(nc, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
+USE_NETMSG(APPLET_NOUSAGE(netmsg, netmsg, _BB_DIR_BIN, _BB_SUID_ALWAYS))
USE_NETSTAT(APPLET(netstat, _BB_DIR_BIN, _BB_SUID_NEVER))
USE_NICE(APPLET(nice, _BB_DIR_BIN, _BB_SUID_NEVER))
- USE_NOHUP(APPLET(nohup, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-diff -ruN busybox-1.2.0-old/networking/Config.in busybox-1.2.0-new/networking/Config.in
---- busybox-1.2.0-old/networking/Config.in 2006-07-01 00:42:02.000000000 +0200
-+++ busybox-1.2.0-new/networking/Config.in 2006-07-31 11:18:01.000000000 +0200
-@@ -445,6 +445,12 @@
+ USE_NMETER(APPLET(nmeter, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
+diff -ruN busybox-1.3.1-old/networking/Config.in busybox-1.3.1-new/networking/Config.in
+--- busybox-1.3.1-old/networking/Config.in 2006-12-27 05:52:39.000000000 +0100
++++ busybox-1.3.1-new/networking/Config.in 2006-12-28 07:25:35.000000000 +0100
+@@ -452,6 +452,12 @@
help
A simple Unix utility which reads and writes data across network
connections.
+
-+config CONFIG_NETMSG
++config NETMSG
+ bool "netmsg"
+ default n
+ help
+ simple program for sending udp broadcast messages
- config CONFIG_NC_GAPING_SECURITY_HOLE
- bool "gaping security hole"
-diff -ruN busybox-1.2.0-old/networking/Makefile.in busybox-1.2.0-new/networking/Makefile.in
---- busybox-1.2.0-old/networking/Makefile.in 2006-07-01 00:42:02.000000000 +0200
-+++ busybox-1.2.0-new/networking/Makefile.in 2006-07-31 11:18:01.000000000 +0200
-@@ -30,6 +30,7 @@
- NETWORKING-$(CONFIG_IPTUNNEL) += iptunnel.o
- NETWORKING-$(CONFIG_NAMEIF) += nameif.o
- NETWORKING-$(CONFIG_NC) += nc.o
-+NETWORKING-$(CONFIG_NETMSG) += netmsg.o
- NETWORKING-$(CONFIG_NETSTAT) += netstat.o
- NETWORKING-$(CONFIG_NSLOOKUP) += nslookup.o
- NETWORKING-$(CONFIG_PING) += ping.o
-diff -ruN busybox-1.2.0-old/networking/netmsg.c busybox-1.2.0-new/networking/netmsg.c
---- busybox-1.2.0-old/networking/netmsg.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.2.0-new/networking/netmsg.c 2006-07-31 11:18:01.000000000 +0200
+ config NC_SERVER
+ bool "Netcat server options (-lp)"
+diff -ruN busybox-1.3.1-old/networking/Kbuild busybox-1.3.1-new/networking/Kbuild
+--- busybox-1.3.1-old/networking/Kbuild 2006-12-27 05:52:39.000000000 +0100
++++ busybox-1.3.1-new/networking/Kbuild 2006-12-28 07:28:29.000000000 +0100
+@@ -25,6 +25,7 @@
+ lib-$(CONFIG_IPTUNNEL) += iptunnel.o
+ lib-$(CONFIG_NAMEIF) += nameif.o
+ lib-$(CONFIG_NC) += nc.o
++lib-$(CONFIG_NETMSG) += netmsg.o
+ lib-$(CONFIG_NETSTAT) += netstat.o
+ lib-$(CONFIG_NSLOOKUP) += nslookup.o
+ lib-$(CONFIG_PING) += ping.o
+diff -ruN busybox-1.3.1-old/networking/netmsg.c busybox-1.3.1-new/networking/netmsg.c
+--- busybox-1.3.1-old/networking/netmsg.c 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.3.1-new/networking/netmsg.c 2006-12-28 07:25:52.000000000 +0100
@@ -0,0 +1,63 @@
+/*
+ * Copyright (C) 2006 Felix Fietkau <nbd@openwrt.org>
@@ -66,7 +61,7 @@ diff -ruN busybox-1.2.0-old/networking/netmsg.c busybox-1.2.0-new/networking/net
+int netmsg_main(int argc, char **argv)
+#endif
+{
-+ int s, i;
++ int s;
+ struct sockaddr_in addr;
+ int optval = 1;
+ unsigned char buf[1001];
diff --git a/package/busybox/patches/310-passwd_access.patch b/package/busybox/patches/310-passwd_access.patch
index 868abfcd06..b6a06cfd7c 100644
--- a/package/busybox/patches/310-passwd_access.patch
+++ b/package/busybox/patches/310-passwd_access.patch
@@ -1,44 +1,44 @@
Copyright (C) 2006 OpenWrt.org
-diff -urN busybox.old/networking/httpd.c busybox.dev/networking/httpd.c
---- busybox.old/networking/httpd.c 2004-10-08 10:03:29.000000000 +0200
-+++ busybox.dev/networking/httpd.c 2006-02-04 01:54:19.688016250 +0100
-@@ -1467,12 +1467,26 @@
- {
- char *cipher;
- char *pp;
-+ char *ppnew = NULL;
-+ struct passwd *pwd = NULL;
+diff -ruN busybox-1.3.1-old/networking/httpd.c busybox-1.3.1/networking/httpd.c
+--- busybox-1.3.1-old/networking/httpd.c 2006-12-28 18:17:23.000000000 +0100
++++ busybox-1.3.1/networking/httpd.c 2006-12-28 19:56:34.000000000 +0100
+@@ -1381,12 +1381,26 @@
+ if (ENABLE_FEATURE_HTTPD_AUTH_MD5) {
+ char *cipher;
+ char *pp;
++ char *ppnew = NULL;
++ struct passwd *pwd = NULL;
- if(strncmp(p, request, u-request) != 0) {
- /* user uncompared */
- continue;
- }
- pp = strchr(p, ':');
-+ if(pp && pp[1] == '$' && pp[2] == 'p' &&
+ if (strncmp(p, request, u-request) != 0) {
+ /* user uncompared */
+ continue;
+ }
+ pp = strchr(p, ':');
++ if(pp && pp[1] == '$' && pp[2] == 'p' &&
+ pp[3] == '$' && pp[4] &&
-+ (pwd = getpwnam(&pp[4])) != NULL) {
-+ if(pwd->pw_passwd && pwd->pw_passwd[0] == '!') {
-+ prev = NULL;
-+ continue;
++ (pwd = getpwnam(&pp[4])) != NULL) {
++ if(pwd->pw_passwd && pwd->pw_passwd[0] == '!') {
++ prev = NULL;
++ continue;
++ }
++ ppnew = xrealloc(ppnew, 5 + strlen(pwd->pw_passwd));
++ ppnew[0] = ':';
++ strcpy(ppnew + 1, pwd->pw_passwd);
++ pp = ppnew;
++ }
+ if (pp && pp[1] == '$' && pp[2] == '1' &&
+ pp[3] == '$' && pp[4]) {
+ pp++;
+@@ -1396,6 +1410,10 @@
+ /* unauthorized */
+ continue;
+ }
++ if (ppnew) {
++ free(ppnew);
++ ppnew = NULL;
+ }
-+ ppnew = malloc(5 + strlen(pwd->pw_passwd));
-+ ppnew[0] = ':';
-+ strcpy(ppnew + 1, pwd->pw_passwd);
-+ pp = ppnew;
-+ }
- if(pp && pp[1] == '$' && pp[2] == '1' &&
- pp[3] == '$' && pp[4]) {
- pp++;
-@@ -1482,6 +1492,10 @@
- /* unauthorized */
- continue;
}
-+ if (ppnew) {
-+ free(ppnew);
-+ ppnew = NULL;
-+ }
- }
- #endif
- if (strcmp(p, request) == 0) {
+
+ if (strcmp(p, request) == 0) {
diff --git a/package/busybox/patches/320-httpd_address_binding.patch b/package/busybox/patches/320-httpd_address_binding.patch
deleted file mode 100644
index 68487b88c7..0000000000
--- a/package/busybox/patches/320-httpd_address_binding.patch
+++ /dev/null
@@ -1,95 +0,0 @@
-# Copyright (C) 2006 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-diff -ruN busybox-1.2.0-old/networking/httpd.c busybox-1.2.0-new/networking/httpd.c
---- busybox-1.2.0-old/networking/httpd.c 2006-07-01 00:42:02.000000000 +0200
-+++ busybox-1.2.0-new/networking/httpd.c 2006-08-01 10:06:58.000000000 +0200
-@@ -99,6 +99,7 @@
- #include <sys/types.h>
- #include <sys/socket.h> /* for connect and socket*/
- #include <netinet/in.h> /* for sockaddr_in */
-+#include <arpa/inet.h>
- #include <sys/stat.h>
- #include <sys/wait.h>
- #include <fcntl.h> /* for open modes */
-@@ -165,6 +166,7 @@
- #endif
- unsigned port; /* server initial port and for
- set env REMOTE_PORT */
-+ char *address;
- union HTTPD_FOUND {
- const char *found_mime_type;
- const char *found_moved_temporarily;
-@@ -868,7 +870,10 @@
- /* inet_addr() returns a value that is already in network order */
- memset(&lsocket, 0, sizeof(lsocket));
- lsocket.sin_family = AF_INET;
-- lsocket.sin_addr.s_addr = INADDR_ANY;
-+ if (inet_aton(config->address, &(lsocket.sin_addr)) == 1) {
-+ if (config->address != NULL) lsocket.sin_addr.s_addr = ((struct in_addr *) ((gethostbyname(config->address))->h_addr))->s_addr;
-+ else lsocket.sin_addr.s_addr = htons(INADDR_ANY);
-+ }
- lsocket.sin_port = htons(config->port);
- fd = bb_xsocket(AF_INET, SOCK_STREAM, 0);
- /* tell the OS it's OK to reuse a previous address even though */
-@@ -1899,6 +1904,7 @@
- USE_FEATURE_HTTPD_AUTH_MD5(m_opt_md5,)
- USE_FEATURE_HTTPD_SETUID(u_opt_setuid,)
- USE_FEATURE_HTTPD_WITHOUT_INETD(p_opt_port,)
-+ USE_FEATURE_HTTPD_WITHOUT_INETD(l_opt_addr,)
- };
-
- static const char httpd_opts[]="c:d:h:"
-@@ -1906,7 +1912,7 @@
- USE_FEATURE_HTTPD_BASIC_AUTH("r:")
- USE_FEATURE_HTTPD_AUTH_MD5("m:")
- USE_FEATURE_HTTPD_SETUID("u:")
-- USE_FEATURE_HTTPD_WITHOUT_INETD("p:");
-+ USE_FEATURE_HTTPD_WITHOUT_INETD("p:l:");
-
- #define OPT_CONFIG_FILE (1<<c_opt_config_file)
- #define OPT_DECODE_URL (1<<d_opt_decode_url)
-@@ -1927,6 +1933,8 @@
- #define OPT_PORT USE_FEATURE_HTTPD_WITHOUT_INETD((1<<p_opt_port)) \
- SKIP_FEATURE_HTTPD_WITHOUT_INETD(0)
-
-+#define OPT_ADDRESS USE_FEATURE_HTTPD_WITHOUT_INETD((1<<l_opt_addr)) \
-+ SKIP_FEATURE_HTTPD_WITHOUT_INETD(0)
-
- int httpd_main(int argc, char *argv[])
- {
-@@ -1935,6 +1943,7 @@
- char *url_for_decode;
- USE_FEATURE_HTTPD_ENCODE_URL_STR(const char *url_for_encode;)
- USE_FEATURE_HTTPD_WITHOUT_INETD(const char *s_port;)
-+ USE_FEATURE_HTTPD_WITHOUT_INETD(const char *s_addr;)
- USE_FEATURE_HTTPD_WITHOUT_INETD(int server;)
-
- USE_FEATURE_HTTPD_SETUID(const char *s_uid;)
-@@ -1949,6 +1958,7 @@
-
- #ifdef CONFIG_FEATURE_HTTPD_WITHOUT_INETD
- config->port = 80;
-+ config->address = "";
- #endif
-
- config->ContentLength = -1;
-@@ -1960,6 +1970,7 @@
- USE_FEATURE_HTTPD_AUTH_MD5(, &pass)
- USE_FEATURE_HTTPD_SETUID(, &s_uid)
- USE_FEATURE_HTTPD_WITHOUT_INETD(, &s_port)
-+ USE_FEATURE_HTTPD_WITHOUT_INETD(, &s_addr)
- );
-
- if(opt & OPT_DECODE_URL) {
-@@ -1981,6 +1992,8 @@
- #ifdef CONFIG_FEATURE_HTTPD_WITHOUT_INETD
- if(opt & OPT_PORT)
- config->port = bb_xgetlarg(s_port, 10, 1, 0xffff);
-+ if (opt & OPT_ADDRESS)
-+ if (s_addr) config->address = (char *) s_addr;
- #ifdef CONFIG_FEATURE_HTTPD_SETUID
- if(opt & OPT_SETUID) {
- char *e;
diff --git a/package/busybox/patches/330-httpd_user_agent.patch b/package/busybox/patches/330-httpd_user_agent.patch
index bbe01f7826..a5b6c0a963 100644
--- a/package/busybox/patches/330-httpd_user_agent.patch
+++ b/package/busybox/patches/330-httpd_user_agent.patch
@@ -1,30 +1,28 @@
-diff -Nur busybox-1.1.1/networking/httpd.c busybox-1.1.1-owrt/networking/httpd.c
---- busybox-1.1.1/networking/httpd.c 2006-04-01 19:42:36.000000000 +0200
-+++ busybox-1.1.1-owrt/networking/httpd.c 2006-04-01 19:43:59.000000000 +0200
-@@ -247,6 +247,7 @@
- const char *query;
+diff -ruN busybox-1.3.1-old/networking/httpd.c busybox-1.3.1/networking/httpd.c
+--- busybox-1.3.1-old/networking/httpd.c 2006-12-27 05:52:39.000000000 +0100
++++ busybox-1.3.1/networking/httpd.c 2006-12-28 18:04:53.000000000 +0100
+@@ -137,6 +137,7 @@
+ const char *query;
- USE_FEATURE_HTTPD_CGI(char *referer;)
-+ USE_FEATURE_HTTPD_CGI(char *user_agent;)
+ USE_FEATURE_HTTPD_CGI(char *referer;)
++ USE_FEATURE_HTTPD_CGI(char *user_agent;)
- const char *configFile;
+ const char *configFile;
-@@ -1208,6 +1209,7 @@
- addEnv("SERVER", "PROTOCOL", "HTTP/1.0");
- addEnv("GATEWAY_INTERFACE", "", "CGI/1.1");
- addEnv("REMOTE", "ADDR", config->rmt_ip_str);
-+ addEnv("HTTP","USER_AGENT", config->user_agent);
- #ifdef CONFIG_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV
- addEnvPort("REMOTE");
+@@ -1062,6 +1063,7 @@
+ putenv("SERVER_PROTOCOL=HTTP/1.0");
+ putenv("GATEWAY_INTERFACE=CGI/1.1");
+ setenv1("REMOTE_ADDR", config->rmt_ip_str);
++ setenv1("HTTP_USER_AGENT", config->user_agent);
+ #if ENABLE_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV
+ setenv_long("REMOTE_PORT", config->port);
#endif
-@@ -1771,6 +1773,10 @@
- for(test = buf + 8; isspace(*test); test++)
- ;
- config->referer = strdup(test);
-+ } else if ((strncasecmp(buf, "User-Agent:",11) ==0)) {
-+ for(test = buf + 11; isspace(*test); test++)
-+ ;
-+ config->user_agent = strdup(test);
- }
+@@ -1605,6 +1607,8 @@
+ content_type = strdup(skip_whitespace(buf + sizeof("Content-Type:")-1));
+ } else if ((STRNCASECMP(buf, "Referer:") == 0)) {
+ config->referer = strdup(skip_whitespace(buf + sizeof("Referer:")-1));
++ } else if ((STRNCASECMP(buf, "User-Agent:") == 0)) {
++ config->user_agent = strdup(skip_whitespace(buf + sizeof("User-Agent:")-1));
+ }
#endif
diff --git a/package/busybox/patches/340-lock_util.patch b/package/busybox/patches/340-lock_util.patch
index acb4457f38..f832df7d91 100644
--- a/package/busybox/patches/340-lock_util.patch
+++ b/package/busybox/patches/340-lock_util.patch
@@ -1,12 +1,7 @@
-# Copyright (C) 2006 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-diff -ruN busybox-1.2.0-old/include/applets.h busybox-1.2.0-new/include/applets.h
---- busybox-1.2.0-old/include/applets.h 2006-07-31 11:21:00.000000000 +0200
-+++ busybox-1.2.0-new/include/applets.h 2006-08-01 10:21:15.000000000 +0200
-@@ -169,6 +169,7 @@
+diff -ruN busybox-1.3.1-old/include/applets.h busybox-1.3.1/include/applets.h
+--- busybox-1.3.1-old/include/applets.h 2006-12-28 07:43:24.000000000 +0100
++++ busybox-1.3.1/include/applets.h 2006-12-28 03:11:36.000000000 +0100
+@@ -180,6 +180,7 @@
USE_LN(APPLET(ln, _BB_DIR_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))
@@ -14,25 +9,36 @@ diff -ruN busybox-1.2.0-old/include/applets.h busybox-1.2.0-new/include/applets.
USE_LOGGER(APPLET(logger, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
USE_LOGIN(APPLET(login, _BB_DIR_BIN, _BB_SUID_ALWAYS))
USE_LOGNAME(APPLET(logname, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-diff -ruN busybox-1.2.0-old/miscutils/Config.in busybox-1.2.0-new/miscutils/Config.in
---- busybox-1.2.0-old/miscutils/Config.in 2006-07-01 00:42:09.000000000 +0200
-+++ busybox-1.2.0-new/miscutils/Config.in 2006-08-01 10:21:15.000000000 +0200
-@@ -231,6 +231,12 @@
+diff -ruN busybox-1.3.1-old/miscutils/Config.in busybox-1.3.1/miscutils/Config.in
+--- busybox-1.3.1-old/miscutils/Config.in 2006-12-27 05:56:09.000000000 +0100
++++ busybox-1.3.1/miscutils/Config.in 2006-12-28 03:14:16.000000000 +0100
+@@ -232,6 +232,12 @@
Enables the 'hdparm -d' option to get/set using_dma flag.
This is dangerous stuff, so you should probably say N.
-+config CONFIG_LOCK
++config LOCK
+ bool "lock"
+ default y
+ help
+ Small utility for using locks in scripts
+
- config CONFIG_MAKEDEVS
+ config MAKEDEVS
bool "makedevs"
default n
-diff -ruN busybox-1.2.0-old/miscutils/lock.c busybox-1.2.0-new/miscutils/lock.c
---- busybox-1.2.0-old/miscutils/lock.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.2.0-new/miscutils/lock.c 2006-08-01 10:21:15.000000000 +0200
+diff -ruN busybox-1.3.1-old/miscutils/Kbuild busybox-1.3.1/miscutils/Kbuild
+--- busybox-1.3.1-old/miscutils/Kbuild 2006-12-27 05:56:09.000000000 +0100
++++ busybox-1.3.1/miscutils/Kbuild 2006-12-28 03:15:47.000000000 +0100
+@@ -15,6 +15,7 @@
+ lib-$(CONFIG_HDPARM) += hdparm.o
+ lib-$(CONFIG_LAST) += last.o
+ lib-$(CONFIG_LESS) += less.o
++lib-$(CONFIG_LOCK) += lock.o
+ lib-$(CONFIG_MAKEDEVS) += makedevs.o
+ lib-$(CONFIG_MOUNTPOINT) += mountpoint.o
+ lib-$(CONFIG_MT) += mt.o
+diff -ruN busybox-1.3.1-old/miscutils/lock.c busybox-1.3.1/miscutils/lock.c
+--- busybox-1.3.1-old/miscutils/lock.c 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.3.1/miscutils/lock.c 2006-12-28 03:11:36.000000000 +0100
@@ -0,0 +1,135 @@
+/*
+ * Copyright (C) 2006 Felix Fietkau <nbd@openwrt.org>
@@ -169,14 +175,3 @@ diff -ruN busybox-1.2.0-old/miscutils/lock.c busybox-1.2.0-new/miscutils/lock.c
+ else
+ return do_lock();
+}
-diff -ruN busybox-1.2.0-old/miscutils/Makefile.in busybox-1.2.0-new/miscutils/Makefile.in
---- busybox-1.2.0-old/miscutils/Makefile.in 2006-07-01 00:42:09.000000000 +0200
-+++ busybox-1.2.0-new/miscutils/Makefile.in 2006-08-01 10:21:15.000000000 +0200
-@@ -20,6 +20,7 @@
- MISCUTILS-$(CONFIG_EJECT) += eject.o
- MISCUTILS-$(CONFIG_HDPARM) += hdparm.o
- MISCUTILS-$(CONFIG_LAST) += last.o
-+MISCUTILS-$(CONFIG_LOCK) += lock.o
- MISCUTILS-${CONFIG_LESS} += less.o
- MISCUTILS-$(CONFIG_MAKEDEVS) += makedevs.o
- MISCUTILS-$(CONFIG_MOUNTPOINT) += mountpoint.o
diff --git a/package/busybox/patches/911-ipkg.patch b/package/busybox/patches/911-ipkg.patch
index fdb790ad59..aec4004579 100644
--- a/package/busybox/patches/911-ipkg.patch
+++ b/package/busybox/patches/911-ipkg.patch
@@ -1,26 +1,33 @@
-diff -ruN busybox-1.2.0-orig/archival/Config.in busybox-1.2.0+ipkg-0.99.162/archival/Config.in
---- busybox-1.2.0-orig/archival/Config.in 2006-07-01 00:42:04.000000000 +0200
-+++ busybox-1.2.0+ipkg-0.99.162/archival/Config.in 2006-07-22 16:31:25.000000000 +0200
+# Copyright (C) 2006 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+# add ipkg support to busybox
+#
+diff -ruN busybox-1.3.1-orig/archival/Config.in busybox-1.3.1-911/archival/Config.in
+--- busybox-1.3.1-orig/archival/Config.in 2006-12-27 05:53:54.000000000 +0100
++++ busybox-1.3.1-911/archival/Config.in 2006-12-28 02:41:16.000000000 +0100
@@ -121,6 +121,14 @@
gzip is used to compress files.
It's probably the most widely used UNIX compression program.
-+config CONFIG_IPKG
++config IPKG
+ bool "ipkg"
+ default n
-+ select CONFIG_MD5SUM
-+ select CONFIG_WGET
++ select MD5SUM
++ select WGET
+ help
+ ipkg is the itsy package management system.
-+
- config CONFIG_RPM2CPIO
++
+ config RPM2CPIO
bool "rpm2cpio"
default n
-diff -ruN busybox-1.2.0-orig/archival/dpkg.c busybox-1.2.0+ipkg-0.99.162/archival/dpkg.c
---- busybox-1.2.0-orig/archival/dpkg.c 2006-07-01 00:42:04.000000000 +0200
-+++ busybox-1.2.0+ipkg-0.99.162/archival/dpkg.c 2006-07-22 16:31:25.000000000 +0200
-@@ -1430,6 +1430,10 @@
- return(ar_handle->sub_archive->buffer);
+diff -ruN busybox-1.3.1-orig/archival/dpkg.c busybox-1.3.1-911/archival/dpkg.c
+--- busybox-1.3.1-orig/archival/dpkg.c 2006-12-27 05:53:54.000000000 +0100
++++ busybox-1.3.1-911/archival/dpkg.c 2006-12-27 19:41:04.000000000 +0100
+@@ -1507,6 +1507,10 @@
+ return ar_handle->sub_archive->buffer;
}
+/*
@@ -30,7 +37,7 @@ diff -ruN busybox-1.2.0-orig/archival/dpkg.c busybox-1.2.0+ipkg-0.99.162/archiva
static void data_extract_all_prefix(archive_handle_t *archive_handle)
{
char *name_ptr = archive_handle->file_header->name;
-@@ -1442,6 +1446,8 @@
+@@ -1519,6 +1523,8 @@
return;
}
@@ -39,9 +46,9 @@ diff -ruN busybox-1.2.0-orig/archival/dpkg.c busybox-1.2.0+ipkg-0.99.162/archiva
static void unpack_package(deb_file_t *deb_file)
{
const char *package_name = name_hashtable[package_hashtable[deb_file->package]->name];
-diff -ruN busybox-1.2.0-orig/archival/ipkg.c busybox-1.2.0+ipkg-0.99.162/archival/ipkg.c
---- busybox-1.2.0-orig/archival/ipkg.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.2.0+ipkg-0.99.162/archival/ipkg.c 2006-07-22 16:31:25.000000000 +0200
+diff -ruN busybox-1.3.1-orig/archival/ipkg.c busybox-1.3.1-911/archival/ipkg.c
+--- busybox-1.3.1-orig/archival/ipkg.c 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.3.1-911/archival/ipkg.c 2006-12-27 19:41:04.000000000 +0100
@@ -0,0 +1,26 @@
+/* ipkg.c - the itsy package management system
+
@@ -69,9 +76,20 @@ diff -ruN busybox-1.2.0-orig/archival/ipkg.c busybox-1.2.0+ipkg-0.99.162/archiva
+{
+ return ipkg_op(argc, argv);
+}
-diff -ruN busybox-1.2.0-orig/archival/libipkg/args.c busybox-1.2.0+ipkg-0.99.162/archival/libipkg/args.c
---- busybox-1.2.0-orig/archival/libipkg/args.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/args.c 2006-07-22 16:31:25.000000000 +0200
+diff -ruN busybox-1.3.1-orig/archival/Kbuild busybox-1.3.1-911/archival/Kbuild
+--- busybox-1.3.1-orig/archival/Kbuild 2006-12-27 05:53:54.000000000 +0100
++++ busybox-1.3.1-911/archival/Kbuild 2006-12-27 19:51:09.000000000 +0100
+@@ -15,6 +15,7 @@
+ lib-$(CONFIG_DPKG_DEB) += dpkg_deb.o
+ lib-$(CONFIG_GUNZIP) += gunzip.o
+ lib-$(CONFIG_GZIP) += gzip.o
++lib-$(CONFIG_IPKG) += ipkg.o
+ lib-$(CONFIG_RPM2CPIO) += rpm2cpio.o
+ lib-$(CONFIG_RPM) += rpm.o
+ lib-$(CONFIG_TAR) += tar.o
+diff -ruN busybox-1.3.1-orig/archival/libipkg/args.c busybox-1.3.1-911/archival/libipkg/args.c
+--- busybox-1.3.1-orig/archival/libipkg/args.c 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.3.1-911/archival/libipkg/args.c 2006-12-27 19:41:04.000000000 +0100
@@ -0,0 +1,242 @@
+/* args.c - parse command-line args
+
@@ -315,9 +333,9 @@ diff -ruN busybox-1.2.0-orig/archival/libipkg/args.c busybox-1.2.0+ipkg-0.99.162
+{
+ bb_error_msg("version %s\n", IPKG_VERSION);
+}
-diff -ruN busybox-1.2.0-orig/archival/libipkg/args.h busybox-1.2.0+ipkg-0.99.162/archival/libipkg/args.h
---- busybox-1.2.0-orig/archival/libipkg/args.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/args.h 2006-07-22 16:31:25.000000000 +0200
+diff -ruN busybox-1.3.1-orig/archival/libipkg/args.h busybox-1.3.1-911/archival/libipkg/args.h
+--- busybox-1.3.1-orig/archival/libipkg/args.h 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.3.1-911/archival/libipkg/args.h 2006-12-27 19:41:04.000000000 +0100
@@ -0,0 +1,72 @@
+/* args.h - parse command-line args
+
@@ -391,9 +409,9 @@ diff -ruN busybox-1.2.0-orig/archival/libipkg/args.h busybox-1.2.0+ipkg-0.99.162
+void args_usage(char *complaint);
+
+#endif
-diff -ruN busybox-1.2.0-orig/archival/libipkg/conffile.c busybox-1.2.0+ipkg-0.99.162/archival/libipkg/conffile.c
---- busybox-1.2.0-orig/archival/libipkg/conffile.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/conffile.c 2006-07-22 16:31:25.000000000 +0200
+diff -ruN busybox-1.3.1-orig/archival/libipkg/conffile.c busybox-1.3.1-911/archival/libipkg/conffile.c
+--- busybox-1.3.1-orig/archival/libipkg/conffile.c 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.3.1-911/archival/libipkg/conffile.c 2006-12-27 19:41:04.000000000 +0100
@@ -0,0 +1,64 @@
+/* conffile.c - the itsy package management system
+
@@ -459,9 +477,9 @@ diff -ruN busybox-1.2.0-orig/archival/libipkg/conffile.c busybox-1.2.0+ipkg-0.99
+
+ return ret;
+}
-diff -ruN busybox-1.2.0-orig/archival/libipkg/conffile.h busybox-1.2.0+ipkg-0.99.162/archival/libipkg/conffile.h
---- busybox-1.2.0-orig/archival/libipkg/conffile.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/conffile.h 2006-07-22 16:31:25.000000000 +0200
+diff -ruN busybox-1.3.1-orig/archival/libipkg/conffile.h busybox-1.3.1-911/archival/libipkg/conffile.h
+--- busybox-1.3.1-orig/archival/libipkg/conffile.h 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.3.1-911/archival/libipkg/conffile.h 2006-12-27 19:41:04.000000000 +0100
@@ -0,0 +1,30 @@
+/* conffile.h - the itsy package management system
+
@@ -493,9 +511,9 @@ diff -ruN busybox-1.2.0-orig/archival/libipkg/conffile.h busybox-1.2.0+ipkg-0.99
+
+#endif
+
-diff -ruN busybox-1.2.0-orig/archival/libipkg/conffile_list.c busybox-1.2.0+ipkg-0.99.162/archival/libipkg/conffile_list.c
---- busybox-1.2.0-orig/archival/libipkg/conffile_list.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/conffile_list.c 2006-07-22 16:31:25.000000000 +0200
+diff -ruN busybox-1.3.1-orig/archival/libipkg/conffile_list.c busybox-1.3.1-911/archival/libipkg/conffile_list.c
+--- busybox-1.3.1-orig/archival/libipkg/conffile_list.c 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.3.1-911/archival/libipkg/conffile_list.c 2006-12-27 19:41:04.000000000 +0100
@@ -0,0 +1,47 @@
+/* conffile_list.c - the itsy package management system
+
@@ -544,9 +562,9 @@ diff -ruN busybox-1.2.0-orig/archival/libipkg/conffile_list.c busybox-1.2.0+ipkg
+ return nv_pair_list_pop(list);
+}
+
-diff -ruN busybox-1.2.0-orig/archival/libipkg/conffile_list.h busybox-1.2.0+ipkg-0.99.162/archival/libipkg/conffile_list.h
---- busybox-1.2.0-orig/archival/libipkg/conffile_list.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/conffile_list.h 2006-07-22 16:31:25.000000000 +0200
+diff -ruN busybox-1.3.1-orig/archival/libipkg/conffile_list.h busybox-1.3.1-911/archival/libipkg/conffile_list.h
+--- busybox-1.3.1-orig/archival/libipkg/conffile_list.h 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.3.1-911/archival/libipkg/conffile_list.h 2006-12-27 19:41:04.000000000 +0100
@@ -0,0 +1,36 @@
+/* conffile_list.h - the itsy package management system
+
@@ -584,9 +602,9 @@ diff -ruN busybox-1.2.0-orig/archival/libipkg/conffile_list.h busybox-1.2.0+ipkg
+
+#endif
+
-diff -ruN busybox-1.2.0-orig/archival/libipkg/file_util.c busybox-1.2.0+ipkg-0.99.162/archival/libipkg/file_util.c
---- busybox-1.2.0-orig/archival/libipkg/file_util.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/file_util.c 2006-07-22 16:31:25.000000000 +0200
+diff -ruN busybox-1.3.1-orig/archival/libipkg/file_util.c busybox-1.3.1-911/archival/libipkg/file_util.c
+--- busybox-1.3.1-orig/archival/libipkg/file_util.c 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.3.1-911/archival/libipkg/file_util.c 2006-12-27 19:41:04.000000000 +0100
@@ -0,0 +1,177 @@
+/* file_util.c - convenience routines for common stat operations
+
@@ -765,9 +783,9 @@ diff -ruN busybox-1.2.0-orig/archival/libipkg/file_util.c busybox-1.2.0+ipkg-0.9
+ return md5sum_hex;
+}
+
-diff -ruN busybox-1.2.0-orig/archival/libipkg/file_util.h busybox-1.2.0+ipkg-0.99.162/archival/libipkg/file_util.h
---- busybox-1.2.0-orig/archival/libipkg/file_util.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/file_util.h 2006-07-22 16:31:25.000000000 +0200
+diff -ruN busybox-1.3.1-orig/archival/libipkg/file_util.h busybox-1.3.1-911/archival/libipkg/file_util.h
+--- busybox-1.3.1-orig/archival/libipkg/file_util.h 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.3.1-911/archival/libipkg/file_util.h 2006-12-27 19:41:04.000000000 +0100
@@ -0,0 +1,29 @@
+/* file_util.h - convenience routines for common file operations
+
@@ -798,9 +816,9 @@ diff -ruN busybox-1.2.0-orig/archival/libipkg/file_util.h busybox-1.2.0+ipkg-0.9
+char *file_md5sum_alloc(const char *file_name);
+
+#endif
-diff -ruN busybox-1.2.0-orig/archival/libipkg/hash_table.c busybox-1.2.0+ipkg-0.99.162/archival/libipkg/hash_table.c
---- busybox-1.2.0-orig/archival/libipkg/hash_table.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/hash_table.c 2006-07-22 16:31:25.000000000 +0200
+diff -ruN busybox-1.3.1-orig/archival/libipkg/hash_table.c busybox-1.3.1-911/archival/libipkg/hash_table.c
+--- busybox-1.3.1-orig/archival/libipkg/hash_table.c 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.3.1-911/archival/libipkg/hash_table.c 2006-12-27 19:41:04.000000000 +0100
@@ -0,0 +1,155 @@
+/* hash.c - hash tables for ipkg
+
@@ -957,9 +975,9 @@ diff -ruN busybox-1.2.0-orig/archival/libipkg/hash_table.c busybox-1.2.0+ipkg-0.
+ }
+}
+
-diff -ruN busybox-1.2.0-orig/archival/libipkg/hash_table.h busybox-1.2.0+ipkg-0.99.162/archival/libipkg/hash_table.h
---- busybox-1.2.0-orig/archival/libipkg/hash_table.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/hash_table.h 2006-07-22 16:31:25.000000000 +0200
+diff -ruN busybox-1.3.1-orig/archival/libipkg/hash_table.h busybox-1.3.1-911/archival/libipkg/hash_table.h
+--- busybox-1.3.1-orig/archival/libipkg/hash_table.h 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.3.1-911/archival/libipkg/hash_table.h 2006-12-27 19:41:04.000000000 +0100
@@ -0,0 +1,44 @@
+/* hash.h - hash tables for ipkg
+
@@ -1005,9 +1023,9 @@ diff -ruN busybox-1.2.0-orig/archival/libipkg/hash_table.h busybox-1.2.0+ipkg-0.
+void hash_table_foreach(hash_table_t *hash, void (*f)(const char *key, void *entry, void *data), void *data);
+
+#endif /* _HASH_TABLE_H_ */
-diff -ruN busybox-1.2.0-orig/archival/libipkg/ipkg_cmd.c busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_cmd.c
---- busybox-1.2.0-orig/archival/libipkg/ipkg_cmd.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_cmd.c 2006-07-22 16:31:25.000000000 +0200
+diff -ruN busybox-1.3.1-orig/archival/libipkg/ipkg_cmd.c busybox-1.3.1-911/archival/libipkg/ipkg_cmd.c
+--- busybox-1.3.1-orig/archival/libipkg/ipkg_cmd.c 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.3.1-911/archival/libipkg/ipkg_cmd.c 2006-12-27 19:41:04.000000000 +0100
@@ -0,0 +1,1431 @@
+/* ipkg_cmd.c - the itsy package management system
+
@@ -2440,9 +2458,9 @@ diff -ruN busybox-1.2.0-orig/archival/libipkg/ipkg_cmd.c busybox-1.2.0+ipkg-0.99
+}
+
+
-diff -ruN busybox-1.2.0-orig/archival/libipkg/ipkg_cmd.h busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_cmd.h
---- busybox-1.2.0-orig/archival/libipkg/ipkg_cmd.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_cmd.h 2006-07-22 16:31:25.000000000 +0200
+diff -ruN busybox-1.3.1-orig/archival/libipkg/ipkg_cmd.h busybox-1.3.1-911/archival/libipkg/ipkg_cmd.h
+--- busybox-1.3.1-orig/archival/libipkg/ipkg_cmd.h 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.3.1-911/archival/libipkg/ipkg_cmd.h 2006-12-27 19:41:04.000000000 +0100
@@ -0,0 +1,46 @@
+/* ipkg_cmd.h - the itsy package management system
+
@@ -2490,9 +2508,9 @@ diff -ruN busybox-1.2.0-orig/archival/libipkg/ipkg_cmd.h busybox-1.2.0+ipkg-0.99
+int pkg_mark_provides(pkg_t *pkg);
+
+#endif
-diff -ruN busybox-1.2.0-orig/archival/libipkg/ipkg_conf.c busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_conf.c
---- busybox-1.2.0-orig/archival/libipkg/ipkg_conf.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_conf.c 2006-07-22 16:31:25.000000000 +0200
+diff -ruN busybox-1.3.1-orig/archival/libipkg/ipkg_conf.c busybox-1.3.1-911/archival/libipkg/ipkg_conf.c
+--- busybox-1.3.1-orig/archival/libipkg/ipkg_conf.c 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.3.1-911/archival/libipkg/ipkg_conf.c 2006-12-27 19:41:04.000000000 +0100
@@ -0,0 +1,711 @@
+/* ipkg_conf.c - the itsy package management system
+
@@ -3205,9 +3223,9 @@ diff -ruN busybox-1.2.0-orig/archival/libipkg/ipkg_conf.c busybox-1.2.0+ipkg-0.9
+ sprintf_alloc(&root_filename, "%s%s", (conf->offline_root ? conf->offline_root : ""), filename);
+ return root_filename;
+}
-diff -ruN busybox-1.2.0-orig/archival/libipkg/ipkg_conf.h busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_conf.h
---- busybox-1.2.0-orig/archival/libipkg/ipkg_conf.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_conf.h 2006-07-22 16:31:25.000000000 +0200
+diff -ruN busybox-1.3.1-orig/archival/libipkg/ipkg_conf.h busybox-1.3.1-911/archival/libipkg/ipkg_conf.h
+--- busybox-1.3.1-orig/archival/libipkg/ipkg_conf.h 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.3.1-911/archival/libipkg/ipkg_conf.h 2006-12-27 19:41:04.000000000 +0100
@@ -0,0 +1,107 @@
+/* ipkg_conf.h - the itsy package management system
+
@@ -3316,9 +3334,9 @@ diff -ruN busybox-1.2.0-orig/archival/libipkg/ipkg_conf.h busybox-1.2.0+ipkg-0.9
+char *root_filename_alloc(ipkg_conf_t *conf, char *filename);
+
+#endif
-diff -ruN busybox-1.2.0-orig/archival/libipkg/ipkg_configure.c busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_configure.c
---- busybox-1.2.0-orig/archival/libipkg/ipkg_configure.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_configure.c 2006-07-22 16:31:25.000000000 +0200
+diff -ruN busybox-1.3.1-orig/archival/libipkg/ipkg_configure.c busybox-1.3.1-911/archival/libipkg/ipkg_configure.c
+--- busybox-1.3.1-orig/archival/libipkg/ipkg_configure.c 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.3.1-911/archival/libipkg/ipkg_configure.c 2006-12-27 19:41:04.000000000 +0100
@@ -0,0 +1,40 @@
+/* ipkg_configure.c - the itsy package management system
+
@@ -3360,9 +3378,9 @@ diff -ruN busybox-1.2.0-orig/archival/libipkg/ipkg_configure.c busybox-1.2.0+ipk
+ return 0;
+}
+
-diff -ruN busybox-1.2.0-orig/archival/libipkg/ipkg_configure.h busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_configure.h
---- busybox-1.2.0-orig/archival/libipkg/ipkg_configure.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_configure.h 2006-07-22 16:31:25.000000000 +0200
+diff -ruN busybox-1.3.1-orig/archival/libipkg/ipkg_configure.h busybox-1.3.1-911/archival/libipkg/ipkg_configure.h
+--- busybox-1.3.1-orig/archival/libipkg/ipkg_configure.h 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.3.1-911/archival/libipkg/ipkg_configure.h 2006-12-27 19:41:04.000000000 +0100
@@ -0,0 +1,25 @@
+/* ipkg_configure.h - the itsy package management system
+
@@ -3389,9 +3407,9 @@ diff -ruN busybox-1.2.0-orig/archival/libipkg/ipkg_configure.h busybox-1.2.0+ipk
+int ipkg_configure(ipkg_conf_t *ipkg_conf, pkg_t *pkg);
+
+#endif
-diff -ruN busybox-1.2.0-orig/archival/libipkg/ipkg_download.c busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_download.c
---- busybox-1.2.0-orig/archival/libipkg/ipkg_download.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_download.c 2006-07-22 16:31:25.000000000 +0200
+diff -ruN busybox-1.3.1-orig/archival/libipkg/ipkg_download.c busybox-1.3.1-911/archival/libipkg/ipkg_download.c
+--- busybox-1.3.1-orig/archival/libipkg/ipkg_download.c 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.3.1-911/archival/libipkg/ipkg_download.c 2006-12-27 19:41:04.000000000 +0100
@@ -0,0 +1,195 @@
+/* ipkg_download.c - the itsy package management system
+
@@ -3588,9 +3606,9 @@ diff -ruN busybox-1.2.0-orig/archival/libipkg/ipkg_download.c busybox-1.2.0+ipkg
+ }
+ return 0;
+}
-diff -ruN busybox-1.2.0-orig/archival/libipkg/ipkg_download.h busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_download.h
---- busybox-1.2.0-orig/archival/libipkg/ipkg_download.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_download.h 2006-07-22 16:31:25.000000000 +0200
+diff -ruN busybox-1.3.1-orig/archival/libipkg/ipkg_download.h busybox-1.3.1-911/archival/libipkg/ipkg_download.h
+--- busybox-1.3.1-orig/archival/libipkg/ipkg_download.h 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.3.1-911/archival/libipkg/ipkg_download.h 2006-12-27 19:41:04.000000000 +0100
@@ -0,0 +1,30 @@
+/* ipkg_download.h - the itsy package management system
+
@@ -3622,9 +3640,9 @@ diff -ruN busybox-1.2.0-orig/archival/libipkg/ipkg_download.h busybox-1.2.0+ipkg
+int ipkg_prepare_url_for_install(ipkg_conf_t *conf, const char *url, char **namep);
+
+#endif
-diff -ruN busybox-1.2.0-orig/archival/libipkg/ipkg.h busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg.h
---- busybox-1.2.0-orig/archival/libipkg/ipkg.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg.h 2006-07-22 16:31:25.000000000 +0200
+diff -ruN busybox-1.3.1-orig/archival/libipkg/ipkg.h busybox-1.3.1-911/archival/libipkg/ipkg.h
+--- busybox-1.3.1-orig/archival/libipkg/ipkg.h 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.3.1-911/archival/libipkg/ipkg.h 2006-12-27 19:41:04.000000000 +0100
@@ -0,0 +1,74 @@
+/* ipkg.h - the itsy package management system
+
@@ -3700,9 +3718,9 @@ diff -ruN busybox-1.2.0-orig/archival/libipkg/ipkg.h busybox-1.2.0+ipkg-0.99.162
+extern ipkg_conf_t *global_conf;
+
+#endif
-diff -ruN busybox-1.2.0-orig/archival/libipkg/ipkg_includes.h busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_includes.h
---- busybox-1.2.0-orig/archival/libipkg/ipkg_includes.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_includes.h 2006-07-22 16:31:25.000000000 +0200
+diff -ruN busybox-1.3.1-orig/archival/libipkg/ipkg_includes.h busybox-1.3.1-911/archival/libipkg/ipkg_includes.h
+--- busybox-1.3.1-orig/archival/libipkg/ipkg_includes.h 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.3.1-911/archival/libipkg/ipkg_includes.h 2006-12-27 19:41:04.000000000 +0100
@@ -0,0 +1,79 @@
+#ifndef IPKG_INCLUDES_H
+#define IPKG_INCLUDES_H
@@ -3783,9 +3801,9 @@ diff -ruN busybox-1.2.0-orig/archival/libipkg/ipkg_includes.h busybox-1.2.0+ipkg
+#endif
+
+#endif /* IPKG_INCLUDES_H */
-diff -ruN busybox-1.2.0-orig/archival/libipkg/ipkg_install.c busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_install.c
---- busybox-1.2.0-orig/archival/libipkg/ipkg_install.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_install.c 2006-07-22 16:31:25.000000000 +0200
+diff -ruN busybox-1.3.1-orig/archival/libipkg/ipkg_install.c busybox-1.3.1-911/archival/libipkg/ipkg_install.c
+--- busybox-1.3.1-orig/archival/libipkg/ipkg_install.c 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.3.1-911/archival/libipkg/ipkg_install.c 2006-12-28 02:28:27.000000000 +0100
@@ -0,0 +1,1942 @@
+/* ipkg_install.c - the itsy package management system
+
@@ -4511,13 +4529,13 @@ diff -ruN busybox-1.2.0-orig/archival/libipkg/ipkg_install.c busybox-1.2.0+ipkg-
+ free(new_version);
+ return rc;
+ } else {
-+ char message_out[15] ;
++ char message_out[15], *version ;
+ memset(message_out,'\x0',15);
+ if ( message )
+ strncpy( message_out,"Upgrading ",strlen("Upgrading ") );
-+ else
++ else
+ strncpy( message_out,"Installing ",strlen("Installing ") );
-+ char *version = pkg_version_str_alloc(pkg);
++ version = pkg_version_str_alloc(pkg);
+
+ ipkg_message(conf, IPKG_NOTICE,
+ "%s%s (%s) to %s...\n", message_out,
@@ -5729,9 +5747,9 @@ diff -ruN busybox-1.2.0-orig/archival/libipkg/ipkg_install.c busybox-1.2.0+ipkg-
+}
+
+#endif
-diff -ruN busybox-1.2.0-orig/archival/libipkg/ipkg_install.h busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_install.h
---- busybox-1.2.0-orig/archival/libipkg/ipkg_install.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_install.h 2006-07-22 16:31:25.000000000 +0200
+diff -ruN busybox-1.3.1-orig/archival/libipkg/ipkg_install.h busybox-1.3.1-911/archival/libipkg/ipkg_install.h
+--- busybox-1.3.1-orig/archival/libipkg/ipkg_install.h 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.3.1-911/archival/libipkg/ipkg_install.h 2006-12-27 19:41:04.000000000 +0100
@@ -0,0 +1,35 @@
+/* ipkg_install.h - the itsy package management system
+
@@ -5768,9 +5786,9 @@ diff -ruN busybox-1.2.0-orig/archival/libipkg/ipkg_install.h busybox-1.2.0+ipkg-
+int name_mark_dependencies_for_installation(ipkg_conf_t *conf, const char *pkg_name, pkg_vec_t *pkgs_needed);
+
+#endif
-diff -ruN busybox-1.2.0-orig/archival/libipkg/ipkg_message.c busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_message.c
---- busybox-1.2.0-orig/archival/libipkg/ipkg_message.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_message.c 2006-07-22 16:31:25.000000000 +0200
+diff -ruN busybox-1.3.1-orig/archival/libipkg/ipkg_message.c busybox-1.3.1-911/archival/libipkg/ipkg_message.c
+--- busybox-1.3.1-orig/archival/libipkg/ipkg_message.c 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.3.1-911/archival/libipkg/ipkg_message.c 2006-12-27 19:41:04.000000000 +0100
@@ -0,0 +1,61 @@
+/* ipkg_message.c - the itsy package management system
+
@@ -5833,9 +5851,9 @@ diff -ruN busybox-1.2.0-orig/archival/libipkg/ipkg_message.c busybox-1.2.0+ipkg-
+ }
+}
+#endif
-diff -ruN busybox-1.2.0-orig/archival/libipkg/ipkg_message.h busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_message.h
---- busybox-1.2.0-orig/archival/libipkg/ipkg_message.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_message.h 2006-07-22 16:31:25.000000000 +0200
+diff -ruN busybox-1.3.1-orig/archival/libipkg/ipkg_message.h busybox-1.3.1-911/archival/libipkg/ipkg_message.h
+--- busybox-1.3.1-orig/archival/libipkg/ipkg_message.h 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.3.1-911/archival/libipkg/ipkg_message.h 2006-12-27 19:41:04.000000000 +0100
@@ -0,0 +1,32 @@
+/* ipkg_message.h - the itsy package management system
+
@@ -5869,9 +5887,9 @@ diff -ruN busybox-1.2.0-orig/archival/libipkg/ipkg_message.h busybox-1.2.0+ipkg-
+extern void ipkg_message(ipkg_conf_t *conf, message_level_t level, char *fmt, ...);
+
+#endif /* _IPKG_MESSAGE_H_ */
-diff -ruN busybox-1.2.0-orig/archival/libipkg/ipkg_remove.c busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_remove.c
---- busybox-1.2.0-orig/archival/libipkg/ipkg_remove.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_remove.c 2006-07-22 16:31:25.000000000 +0200
+diff -ruN busybox-1.3.1-orig/archival/libipkg/ipkg_remove.c busybox-1.3.1-911/archival/libipkg/ipkg_remove.c
+--- busybox-1.3.1-orig/archival/libipkg/ipkg_remove.c 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.3.1-911/archival/libipkg/ipkg_remove.c 2006-12-27 19:41:04.000000000 +0100
@@ -0,0 +1,383 @@
+/* ipkg_remove.c - the itsy package management system
+
@@ -6256,9 +6274,9 @@ diff -ruN busybox-1.2.0-orig/archival/libipkg/ipkg_remove.c busybox-1.2.0+ipkg-0
+
+ return 0;
+}
-diff -ruN busybox-1.2.0-orig/archival/libipkg/ipkg_remove.h busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_remove.h
---- busybox-1.2.0-orig/archival/libipkg/ipkg_remove.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_remove.h 2006-07-22 16:31:25.000000000 +0200
+diff -ruN busybox-1.3.1-orig/archival/libipkg/ipkg_remove.h busybox-1.3.1-911/archival/libipkg/ipkg_remove.h
+--- busybox-1.3.1-orig/archival/libipkg/ipkg_remove.h 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.3.1-911/archival/libipkg/ipkg_remove.h 2006-12-27 19:41:04.000000000 +0100
@@ -0,0 +1,33 @@
+/* ipkg_remove.h - the itsy package management system
+
@@ -6293,9 +6311,9 @@ diff -ruN busybox-1.2.0-orig/archival/libipkg/ipkg_remove.h busybox-1.2.0+ipkg-0
+
+
+#endif
-diff -ruN busybox-1.2.0-orig/archival/libipkg/ipkg_upgrade.c busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_upgrade.c
---- busybox-1.2.0-orig/archival/libipkg/ipkg_upgrade.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_upgrade.c 2006-07-22 16:31:25.000000000 +0200
+diff -ruN busybox-1.3.1-orig/archival/libipkg/ipkg_upgrade.c busybox-1.3.1-911/archival/libipkg/ipkg_upgrade.c
+--- busybox-1.3.1-orig/archival/libipkg/ipkg_upgrade.c 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.3.1-911/archival/libipkg/ipkg_upgrade.c 2006-12-27 19:41:04.000000000 +0100
@@ -0,0 +1,77 @@
+/* ipkg_upgrade.c - the itsy package management system
+
@@ -6374,9 +6392,9 @@ diff -ruN busybox-1.2.0-orig/archival/libipkg/ipkg_upgrade.c busybox-1.2.0+ipkg-
+ new->state_flag |= SF_USER;
+ return ipkg_install_pkg(conf, new,1);
+}
-diff -ruN busybox-1.2.0-orig/archival/libipkg/ipkg_upgrade.h busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_upgrade.h
---- busybox-1.2.0-orig/archival/libipkg/ipkg_upgrade.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_upgrade.h 2006-07-22 16:31:25.000000000 +0200
+diff -ruN busybox-1.3.1-orig/archival/libipkg/ipkg_upgrade.h busybox-1.3.1-911/archival/libipkg/ipkg_upgrade.h
+--- busybox-1.3.1-orig/archival/libipkg/ipkg_upgrade.h 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.3.1-911/archival/libipkg/ipkg_upgrade.h 2006-12-27 19:41:04.000000000 +0100
@@ -0,0 +1,18 @@
+/* ipkg_upgrade.c - the itsy package management system
+
@@ -6396,9 +6414,9 @@ diff -ruN busybox-1.2.0-orig/archival/libipkg/ipkg_upgrade.h busybox-1.2.0+ipkg-
+#include "ipkg.h"
+
+int ipkg_upgrade_pkg(ipkg_conf_t *conf, pkg_t *old);
-diff -ruN busybox-1.2.0-orig/archival/libipkg/ipkg_utils.c busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_utils.c
---- busybox-1.2.0-orig/archival/libipkg/ipkg_utils.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_utils.c 2006-07-22 16:31:25.000000000 +0200
+diff -ruN busybox-1.3.1-orig/archival/libipkg/ipkg_utils.c busybox-1.3.1-911/archival/libipkg/ipkg_utils.c
+--- busybox-1.3.1-orig/archival/libipkg/ipkg_utils.c 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.3.1-911/archival/libipkg/ipkg_utils.c 2006-12-27 19:41:04.000000000 +0100
@@ -0,0 +1,181 @@
+/* ipkg_utils.c - the itsy package management system
+
@@ -6581,9 +6599,9 @@ diff -ruN busybox-1.2.0-orig/archival/libipkg/ipkg_utils.c busybox-1.2.0+ipkg-0.
+}
+
+
-diff -ruN busybox-1.2.0-orig/archival/libipkg/ipkg_utils.h busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_utils.h
---- busybox-1.2.0-orig/archival/libipkg/ipkg_utils.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_utils.h 2006-07-22 16:31:25.000000000 +0200
+diff -ruN busybox-1.3.1-orig/archival/libipkg/ipkg_utils.h busybox-1.3.1-911/archival/libipkg/ipkg_utils.h
+--- busybox-1.3.1-orig/archival/libipkg/ipkg_utils.h 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.3.1-911/archival/libipkg/ipkg_utils.h 2006-12-27 19:41:04.000000000 +0100
@@ -0,0 +1,29 @@
+/* ipkg_utils.h - the itsy package management system
+
@@ -6614,9 +6632,74 @@ diff -ruN busybox-1.2.0-orig/archival/libipkg/ipkg_utils.h busybox-1.2.0+ipkg-0.
+int line_is_blank(const char *line);
+
+#endif
-diff -ruN busybox-1.2.0-orig/archival/libipkg/libipkg.c busybox-1.2.0+ipkg-0.99.162/archival/libipkg/libipkg.c
---- busybox-1.2.0-orig/archival/libipkg/libipkg.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/libipkg.c 2006-07-22 16:31:25.000000000 +0200
+diff -ruN busybox-1.3.1-orig/archival/libipkg/Kbuild busybox-1.3.1-911/archival/libipkg/Kbuild
+--- busybox-1.3.1-orig/archival/libipkg/Kbuild 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.3.1-911/archival/libipkg/Kbuild 2006-12-28 02:03:22.000000000 +0100
+@@ -0,0 +1,61 @@
++# Makefile for busybox
++#
++# Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org>
++# Copyright (C) 2006 OpenWrt.org
++#
++# Licensed under the GPL v2 or later, see the file LICENSE in this tarball.
++
++LIBIPKG_CORE_OBJS:= \
++ args.o \
++ libipkg.o \
++ user.o \
++
++LIBIPKG_CMD_OBJS:= \
++ ipkg_cmd.o \
++ ipkg_configure.o \
++ ipkg_download.o \
++ ipkg_install.o \
++ ipkg_remove.o \
++ ipkg_upgrade.o \
++
++LIBIPKG_DB_OBJS:= \
++ hash_table.o \
++ ipkg_conf.o \
++ ipkg_utils.o \
++ pkg.o \
++ pkg_depends.o \
++ pkg_extract.o \
++ pkg_hash.o \
++ pkg_parse.o \
++ pkg_vec.o \
++
++LIBIPKG_LIST_OBJS:= \
++ conffile.o \
++ conffile_list.o \
++ nv_pair.o \
++ nv_pair_list.o \
++ pkg_dest.o \
++ pkg_dest_list.o \
++ pkg_src.o \
++ pkg_src_list.o \
++ str_list.o \
++ void_list.o \
++
++LIBIPKG_UTIL_OBJS:= \
++ file_util.o \
++ ipkg_message.o \
++ md5.o \
++ str_util.o \
++ xsystem.o \
++
++lib-y :=
++lib-$(CONFIG_IPKG) += $(LIBIPKG_CORE_OBJS)
++lib-$(CONFIG_IPKG) += $(LIBIPKG_CMD_OBJS)
++lib-$(CONFIG_IPKG) += $(LIBIPKG_DB_OBJS)
++lib-$(CONFIG_IPKG) += $(LIBIPKG_LIST_OBJS)
++lib-$(CONFIG_IPKG) += $(LIBIPKG_UTIL_OBJS)
++
++ifeq ($(strip $(IPKG_ARCH)),)
++IPKG_ARCH:=$(TARGET_ARCH)
++endif
++CFLAGS += -DIPKG_LIB -DIPKGLIBDIR="\"/usr/lib\"" -DHOST_CPU_STR="\"$(IPKG_ARCH)\""
+diff -ruN busybox-1.3.1-orig/archival/libipkg/libipkg.c busybox-1.3.1-911/archival/libipkg/libipkg.c
+--- busybox-1.3.1-orig/archival/libipkg/libipkg.c 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.3.1-911/archival/libipkg/libipkg.c 2006-12-27 19:41:04.000000000 +0100
@@ -0,0 +1,527 @@
+/* ipkglib.c - the itsy package management system
+
@@ -7145,9 +7228,9 @@ diff -ruN busybox-1.2.0-orig/archival/libipkg/libipkg.c busybox-1.2.0+ipkg-0.99.
+}
+
+#endif /* IPKG_LIB */
-diff -ruN busybox-1.2.0-orig/archival/libipkg/libipkg.h busybox-1.2.0+ipkg-0.99.162/archival/libipkg/libipkg.h
---- busybox-1.2.0-orig/archival/libipkg/libipkg.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/libipkg.h 2006-07-22 16:31:25.000000000 +0200
+diff -ruN busybox-1.3.1-orig/archival/libipkg/libipkg.h busybox-1.3.1-911/archival/libipkg/libipkg.h
+--- busybox-1.3.1-orig/archival/libipkg/libipkg.h 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.3.1-911/archival/libipkg/libipkg.h 2006-12-27 19:41:04.000000000 +0100
@@ -0,0 +1,87 @@
+/* ipkglib.h - the itsy package management system
+
@@ -7236,137 +7319,9 @@ diff -ruN busybox-1.2.0-orig/archival/libipkg/libipkg.h busybox-1.2.0+ipkg-0.99.
+
+
+#endif
-diff -ruN busybox-1.2.0-orig/archival/libipkg/Makefile busybox-1.2.0+ipkg-0.99.162/archival/libipkg/Makefile
---- busybox-1.2.0-orig/archival/libipkg/Makefile 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/Makefile 2006-07-22 16:31:25.000000000 +0200
-@@ -0,0 +1,32 @@
-+# Makefile for busybox
-+#
-+# Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org>
-+#
-+# This program is free software; you can redistribute it and/or modify
-+# it under the terms of the GNU General Public License as published by
-+# the Free Software Foundation; either version 2 of the License, or
-+# (at your option) any later version.
-+#
-+# This program is distributed in the hope that it will be useful,
-+# but WITHOUT ANY WARRANTY; without even the implied warranty of
-+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+# General Public License for more details.
-+#
-+# You should have received a copy of the GNU General Public License
-+# along with this program; if not, write to the Free Software
-+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-+#
-+
-+top_srcdir=../..
-+top_builddir=../..
-+srcdir=$(top_srcdir)/archival/libipkg
-+LIBIPKG_DIR:=./
-+include $(top_builddir)/Rules.mak
-+include $(top_builddir)/.config
-+include $(srcdir)/Makefile.in
-+all: $(libraries-y)
-+-include $(top_builddir)/.depend
-+
-+clean:
-+ rm -f *.o *.a $(AR_TARGET)
-+
-diff -ruN busybox-1.2.0-orig/archival/libipkg/Makefile.in busybox-1.2.0+ipkg-0.99.162/archival/libipkg/Makefile.in
---- busybox-1.2.0-orig/archival/libipkg/Makefile.in 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/Makefile.in 2006-10-08 12:29:39.000000000 +0200
-@@ -0,0 +1,88 @@
-+# Makefile for busybox
-+#
-+# Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org>
-+#
-+# This program is free software; you can redistribute it and/or modify
-+# it under the terms of the GNU General Public License as published by
-+# the Free Software Foundation; either version 2 of the License, or
-+# (at your option) any later version.
-+#
-+# This program is distributed in the hope that it will be useful,
-+# but WITHOUT ANY WARRANTY; without even the implied warranty of
-+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+# General Public License for more details.
-+#
-+# You should have received a copy of the GNU General Public License
-+# along with this program; if not, write to the Free Software
-+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-+#
-+
-+LIBIPKG_AR:=libipkg.a
-+ifndef $(LIBIPKG_DIR)
-+LIBIPKG_DIR:=$(top_builddir)/archival/libipkg/
-+endif
-+srcdir=$(top_srcdir)/archival/libipkg
-+
-+LIBIPKG_CORE_SOURCES:= \
-+ args.c \
-+ libipkg.c \
-+ user.c \
-+
-+LIBIPKG_CMD_SOURCES:= \
-+ ipkg_cmd.c \
-+ ipkg_configure.c \
-+ ipkg_download.c \
-+ ipkg_install.c \
-+ ipkg_remove.c \
-+ ipkg_upgrade.c \
-+
-+LIBIPKG_DB_SOURCES:= \
-+ hash_table.c \
-+ ipkg_conf.c \
-+ ipkg_utils.c \
-+ pkg.c \
-+ pkg_depends.c \
-+ pkg_extract.c \
-+ pkg_hash.c \
-+ pkg_parse.c \
-+ pkg_vec.c \
-+
-+LIBIPKG_LIST_SOURCES:= \
-+ conffile.c \
-+ conffile_list.c \
-+ nv_pair.c \
-+ nv_pair_list.c \
-+ pkg_dest.c \
-+ pkg_dest_list.c \
-+ pkg_src.c \
-+ pkg_src_list.c \
-+ str_list.c \
-+ void_list.c \
-+
-+LIBIPKG_UTIL_SOURCES:= \
-+ file_util.c \
-+ ipkg_message.c \
-+ md5.c \
-+ str_util.c \
-+ xsystem.c \
-+
-+LIBIPKG-$(CONFIG_IPKG) += $(LIBIPKG_CORE_SOURCES)
-+LIBIPKG-$(CONFIG_IPKG) += $(LIBIPKG_CMD_SOURCES)
-+LIBIPKG-$(CONFIG_IPKG) += $(LIBIPKG_DB_SOURCES)
-+LIBIPKG-$(CONFIG_IPKG) += $(LIBIPKG_LIST_SOURCES)
-+LIBIPKG-$(CONFIG_IPKG) += $(LIBIPKG_UTIL_SOURCES)
-+LIBIPKG_OBJS=$(patsubst %.c,$(LIBIPKG_DIR)%.o, $(LIBIPKG-y))
-+
-+ifeq ($(strip $(IPKG_ARCH)),)
-+IPKG_ARCH:=$(TARGET_ARCH)
-+endif
-+CFLAGS += -DIPKG_LIB -DIPKGLIBDIR="\"/usr/lib\"" -DHOST_CPU_STR="\"$(IPKG_ARCH)\""
-+
-+libraries-$(CONFIG_IPKG) += $(LIBIPKG_DIR)$(LIBIPKG_AR)
-+
-+$(LIBIPKG_DIR)$(LIBIPKG_AR): $(LIBIPKG_OBJS)
-+ $(do_ar)
-+
-+$(LIBIPKG_OBJS): $(LIBIPKG_DIR)%.o : $(srcdir)/%.c
-+ $(compile.c)
-+
-diff -ruN busybox-1.2.0-orig/archival/libipkg/md5.c busybox-1.2.0+ipkg-0.99.162/archival/libipkg/md5.c
---- busybox-1.2.0-orig/archival/libipkg/md5.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/md5.c 2006-07-22 16:31:25.000000000 +0200
+diff -ruN busybox-1.3.1-orig/archival/libipkg/md5.c busybox-1.3.1-911/archival/libipkg/md5.c
+--- busybox-1.3.1-orig/archival/libipkg/md5.c 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.3.1-911/archival/libipkg/md5.c 2006-12-27 19:41:04.000000000 +0100
@@ -0,0 +1,48 @@
+/* md5.c - wrappers to busybox md5 functions
+ *
@@ -7416,9 +7371,9 @@ diff -ruN busybox-1.2.0-orig/archival/libipkg/md5.c busybox-1.2.0+ipkg-0.99.162/
+ return md5_end(resblock, &md5_cx);
+}
+
-diff -ruN busybox-1.2.0-orig/archival/libipkg/md5.h busybox-1.2.0+ipkg-0.99.162/archival/libipkg/md5.h
---- busybox-1.2.0-orig/archival/libipkg/md5.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/md5.h 2006-07-22 16:31:25.000000000 +0200
+diff -ruN busybox-1.3.1-orig/archival/libipkg/md5.h busybox-1.3.1-911/archival/libipkg/md5.h
+--- busybox-1.3.1-orig/archival/libipkg/md5.h 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.3.1-911/archival/libipkg/md5.h 2006-12-27 19:41:04.000000000 +0100
@@ -0,0 +1,35 @@
+/* md5.h - Compute MD5 checksum of files or strings according to the
+ * definition of MD5 in RFC 1321 from April 1992.
@@ -7455,9 +7410,9 @@ diff -ruN busybox-1.2.0-orig/archival/libipkg/md5.h busybox-1.2.0+ipkg-0.99.162/
+
+#endif
+
-diff -ruN busybox-1.2.0-orig/archival/libipkg/nv_pair.c busybox-1.2.0+ipkg-0.99.162/archival/libipkg/nv_pair.c
---- busybox-1.2.0-orig/archival/libipkg/nv_pair.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/nv_pair.c 2006-07-22 16:31:25.000000000 +0200
+diff -ruN busybox-1.3.1-orig/archival/libipkg/nv_pair.c busybox-1.3.1-911/archival/libipkg/nv_pair.c
+--- busybox-1.3.1-orig/archival/libipkg/nv_pair.c 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.3.1-911/archival/libipkg/nv_pair.c 2006-12-27 19:41:04.000000000 +0100
@@ -0,0 +1,40 @@
+/* nv_pair.c - the itsy package management system
+
@@ -7499,9 +7454,9 @@ diff -ruN busybox-1.2.0-orig/archival/libipkg/nv_pair.c busybox-1.2.0+ipkg-0.99.
+}
+
+
-diff -ruN busybox-1.2.0-orig/archival/libipkg/nv_pair.h busybox-1.2.0+ipkg-0.99.162/archival/libipkg/nv_pair.h
---- busybox-1.2.0-orig/archival/libipkg/nv_pair.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/nv_pair.h 2006-07-22 16:31:25.000000000 +0200
+diff -ruN busybox-1.3.1-orig/archival/libipkg/nv_pair.h busybox-1.3.1-911/archival/libipkg/nv_pair.h
+--- busybox-1.3.1-orig/archival/libipkg/nv_pair.h 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.3.1-911/archival/libipkg/nv_pair.h 2006-12-27 19:41:04.000000000 +0100
@@ -0,0 +1,32 @@
+/* nv_pair.h - the itsy package management system
+
@@ -7535,9 +7490,9 @@ diff -ruN busybox-1.2.0-orig/archival/libipkg/nv_pair.h busybox-1.2.0+ipkg-0.99.
+
+#endif
+
-diff -ruN busybox-1.2.0-orig/archival/libipkg/nv_pair_list.c busybox-1.2.0+ipkg-0.99.162/archival/libipkg/nv_pair_list.c
---- busybox-1.2.0-orig/archival/libipkg/nv_pair_list.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/nv_pair_list.c 2006-07-22 16:31:25.000000000 +0200
+diff -ruN busybox-1.3.1-orig/archival/libipkg/nv_pair_list.c busybox-1.3.1-911/archival/libipkg/nv_pair_list.c
+--- busybox-1.3.1-orig/archival/libipkg/nv_pair_list.c 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.3.1-911/archival/libipkg/nv_pair_list.c 2006-12-27 19:41:04.000000000 +0100
@@ -0,0 +1,98 @@
+/* nv_pair_list.c - the itsy package management system
+
@@ -7637,9 +7592,9 @@ diff -ruN busybox-1.2.0-orig/archival/libipkg/nv_pair_list.c busybox-1.2.0+ipkg-
+ }
+ return NULL;
+}
-diff -ruN busybox-1.2.0-orig/archival/libipkg/nv_pair_list.h busybox-1.2.0+ipkg-0.99.162/archival/libipkg/nv_pair_list.h
---- busybox-1.2.0-orig/archival/libipkg/nv_pair_list.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/nv_pair_list.h 2006-07-22 16:31:25.000000000 +0200
+diff -ruN busybox-1.3.1-orig/archival/libipkg/nv_pair_list.h busybox-1.3.1-911/archival/libipkg/nv_pair_list.h
+--- busybox-1.3.1-orig/archival/libipkg/nv_pair_list.h 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.3.1-911/archival/libipkg/nv_pair_list.h 2006-12-27 19:41:04.000000000 +0100
@@ -0,0 +1,60 @@
+/* nv_pair_list.h - the itsy package management system
+
@@ -7701,9 +7656,9 @@ diff -ruN busybox-1.2.0-orig/archival/libipkg/nv_pair_list.h busybox-1.2.0+ipkg-
+
+#endif
+
-diff -ruN busybox-1.2.0-orig/archival/libipkg/pkg.c busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg.c
---- busybox-1.2.0-orig/archival/libipkg/pkg.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg.c 2006-07-22 16:31:25.000000000 +0200
+diff -ruN busybox-1.3.1-orig/archival/libipkg/pkg.c busybox-1.3.1-911/archival/libipkg/pkg.c
+--- busybox-1.3.1-orig/archival/libipkg/pkg.c 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.3.1-911/archival/libipkg/pkg.c 2006-12-27 19:41:04.000000000 +0100
@@ -0,0 +1,1754 @@
+/* pkg.c - the itsy package management system
+
@@ -9459,9 +9414,9 @@ diff -ruN busybox-1.2.0-orig/archival/libipkg/pkg.c busybox-1.2.0+ipkg-0.99.162/
+ }
+ return 0;
+}
-diff -ruN busybox-1.2.0-orig/archival/libipkg/pkg_depends.c busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg_depends.c
---- busybox-1.2.0-orig/archival/libipkg/pkg_depends.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg_depends.c 2006-07-22 16:31:25.000000000 +0200
+diff -ruN busybox-1.3.1-orig/archival/libipkg/pkg_depends.c busybox-1.3.1-911/archival/libipkg/pkg_depends.c
+--- busybox-1.3.1-orig/archival/libipkg/pkg_depends.c 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.3.1-911/archival/libipkg/pkg_depends.c 2006-12-27 19:41:04.000000000 +0100
@@ -0,0 +1,1033 @@
+/* pkg_depends.c - the itsy package management system
+
@@ -10496,9 +10451,9 @@ diff -ruN busybox-1.2.0-orig/archival/libipkg/pkg_depends.c busybox-1.2.0+ipkg-0
+
+ return 0;
+}
-diff -ruN busybox-1.2.0-orig/archival/libipkg/pkg_depends.h busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg_depends.h
---- busybox-1.2.0-orig/archival/libipkg/pkg_depends.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg_depends.h 2006-07-22 16:31:25.000000000 +0200
+diff -ruN busybox-1.3.1-orig/archival/libipkg/pkg_depends.h busybox-1.3.1-911/archival/libipkg/pkg_depends.h
+--- busybox-1.3.1-orig/archival/libipkg/pkg_depends.h 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.3.1-911/archival/libipkg/pkg_depends.h 2006-12-27 19:41:04.000000000 +0100
@@ -0,0 +1,105 @@
+/* pkg_depends.h - the itsy package management system
+
@@ -10605,9 +10560,9 @@ diff -ruN busybox-1.2.0-orig/archival/libipkg/pkg_depends.h busybox-1.2.0+ipkg-0
+int pkg_dependence_satisfied(ipkg_conf_t *conf, depend_t *depend);
+
+#endif
-diff -ruN busybox-1.2.0-orig/archival/libipkg/pkg_dest.c busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg_dest.c
---- busybox-1.2.0-orig/archival/libipkg/pkg_dest.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg_dest.c 2006-07-22 16:31:25.000000000 +0200
+diff -ruN busybox-1.3.1-orig/archival/libipkg/pkg_dest.c busybox-1.3.1-911/archival/libipkg/pkg_dest.c
+--- busybox-1.3.1-orig/archival/libipkg/pkg_dest.c 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.3.1-911/archival/libipkg/pkg_dest.c 2006-12-27 19:41:04.000000000 +0100
@@ -0,0 +1,92 @@
+/* pkg_dest.c - the itsy package management system
+
@@ -10701,9 +10656,9 @@ diff -ruN busybox-1.2.0-orig/archival/libipkg/pkg_dest.c busybox-1.2.0+ipkg-0.99
+
+ dest->root_dir = NULL;
+}
-diff -ruN busybox-1.2.0-orig/archival/libipkg/pkg_dest.h busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg_dest.h
---- busybox-1.2.0-orig/archival/libipkg/pkg_dest.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg_dest.h 2006-07-22 16:31:25.000000000 +0200
+diff -ruN busybox-1.3.1-orig/archival/libipkg/pkg_dest.h busybox-1.3.1-911/archival/libipkg/pkg_dest.h
+--- busybox-1.3.1-orig/archival/libipkg/pkg_dest.h 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.3.1-911/archival/libipkg/pkg_dest.h 2006-12-27 19:41:04.000000000 +0100
@@ -0,0 +1,38 @@
+/* pkg_dest.h - the itsy package management system
+
@@ -10743,9 +10698,9 @@ diff -ruN busybox-1.2.0-orig/archival/libipkg/pkg_dest.h busybox-1.2.0+ipkg-0.99
+
+#endif
+
-diff -ruN busybox-1.2.0-orig/archival/libipkg/pkg_dest_list.c busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg_dest_list.c
---- busybox-1.2.0-orig/archival/libipkg/pkg_dest_list.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg_dest_list.c 2006-07-22 16:31:25.000000000 +0200
+diff -ruN busybox-1.3.1-orig/archival/libipkg/pkg_dest_list.c busybox-1.3.1-911/archival/libipkg/pkg_dest_list.c
+--- busybox-1.3.1-orig/archival/libipkg/pkg_dest_list.c 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.3.1-911/archival/libipkg/pkg_dest_list.c 2006-12-27 19:41:04.000000000 +0100
@@ -0,0 +1,85 @@
+/* pkg_dest_list.c - the itsy package management system
+
@@ -10832,9 +10787,9 @@ diff -ruN busybox-1.2.0-orig/archival/libipkg/pkg_dest_list.c busybox-1.2.0+ipkg
+{
+ return (pkg_dest_list_elt_t *) void_list_pop((void_list_t *) list);
+}
-diff -ruN busybox-1.2.0-orig/archival/libipkg/pkg_dest_list.h busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg_dest_list.h
---- busybox-1.2.0-orig/archival/libipkg/pkg_dest_list.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg_dest_list.h 2006-07-22 16:31:25.000000000 +0200
+diff -ruN busybox-1.3.1-orig/archival/libipkg/pkg_dest_list.h busybox-1.3.1-911/archival/libipkg/pkg_dest_list.h
+--- busybox-1.3.1-orig/archival/libipkg/pkg_dest_list.h 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.3.1-911/archival/libipkg/pkg_dest_list.h 2006-12-27 19:41:04.000000000 +0100
@@ -0,0 +1,50 @@
+/* pkg_dest_list.h - the itsy package management system
+
@@ -10886,9 +10841,9 @@ diff -ruN busybox-1.2.0-orig/archival/libipkg/pkg_dest_list.h busybox-1.2.0+ipkg
+
+#endif
+
-diff -ruN busybox-1.2.0-orig/archival/libipkg/pkg_extract.c busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg_extract.c
---- busybox-1.2.0-orig/archival/libipkg/pkg_extract.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg_extract.c 2006-07-30 22:47:49.000000000 +0200
+diff -ruN busybox-1.3.1-orig/archival/libipkg/pkg_extract.c busybox-1.3.1-911/archival/libipkg/pkg_extract.c
+--- busybox-1.3.1-orig/archival/libipkg/pkg_extract.c 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.3.1-911/archival/libipkg/pkg_extract.c 2006-12-28 02:28:27.000000000 +0100
@@ -0,0 +1,224 @@
+/* pkg_extract.c - the itsy package management system
+
@@ -10930,7 +10885,7 @@ diff -ruN busybox-1.2.0-orig/archival/libipkg/pkg_extract.c busybox-1.2.0+ipkg-0
+
+ sprintf_alloc(&path, "%s/", dir);
+ archive = init_handle();
-+ archive->src_fd = bb_xopen(pkg->local_filename, O_RDONLY);
++ archive->src_fd = xopen(pkg->local_filename, O_RDONLY);
+ archive->filter = filter_accept_list;
+ llist_add_to(&(archive->accept), (char *)filename);
+ archive->buffer = path;
@@ -10967,7 +10922,7 @@ diff -ruN busybox-1.2.0-orig/archival/libipkg/pkg_extract.c busybox-1.2.0+ipkg-0
+ extract_ipkg_file_to_dir(pkg, global_conf->tmp_dir, "./" IPKG_CONTROL_ARCHIVE);
+ sprintf_alloc(&name, "%s/%s", global_conf->tmp_dir, IPKG_CONTROL_ARCHIVE);
+ archive = init_handle();
-+ archive->src_fd = bb_xopen(name, O_RDONLY);
++ archive->src_fd = xopen(name, O_RDONLY);
+ archive->filter = filter_accept_list;
+ llist_add_to(&(archive->accept), "./" IPKG_CONTROL_FILE);
+ archive->action_data = data_extract_to_buffer;
@@ -10997,7 +10952,7 @@ diff -ruN busybox-1.2.0-orig/archival/libipkg/pkg_extract.c busybox-1.2.0+ipkg-0
+ sprintf_alloc(&name, "%s/%s", global_conf->tmp_dir, IPKG_CONTROL_ARCHIVE);
+ sprintf_alloc(&path, "%s/%s", dir, prefix);
+ archive = init_handle();
-+ archive->src_fd = bb_xopen(name, O_RDONLY);
++ archive->src_fd = xopen(name, O_RDONLY);
+ archive->filter = filter_accept_all;
+ archive->buffer = path;
+ archive->action_data = data_extract_all_prefix;
@@ -11021,7 +10976,7 @@ diff -ruN busybox-1.2.0-orig/archival/libipkg/pkg_extract.c busybox-1.2.0+ipkg-0
+ sprintf_alloc(&name, "%s/%s", global_conf->tmp_dir, IPKG_DATA_ARCHIVE);
+ sprintf_alloc(&path, "%s/", dir);
+ archive = init_handle();
-+ archive->src_fd = bb_xopen(name, O_RDONLY);
++ archive->src_fd = xopen(name, O_RDONLY);
+ archive->filter = filter_accept_all;
+ archive->buffer = path;
+ archive->action_data = data_extract_all_prefix;
@@ -11102,7 +11057,7 @@ diff -ruN busybox-1.2.0-orig/archival/libipkg/pkg_extract.c busybox-1.2.0+ipkg-0
+ extract_ipkg_file_to_dir(pkg, global_conf->tmp_dir, "./" IPKG_DATA_ARCHIVE);
+ sprintf_alloc(&name, "%s/%s", global_conf->tmp_dir, IPKG_DATA_ARCHIVE);
+ archive = init_handle();
-+ archive->src_fd = bb_xopen(name, O_RDONLY);
++ archive->src_fd = xopen(name, O_RDONLY);
+ archive->filter = filter_accept_all;
+ archive->action_data = data_extract_file_name_to_buffer;
+ while( get_header_tar_gz(archive) == EXIT_SUCCESS );
@@ -11114,9 +11069,9 @@ diff -ruN busybox-1.2.0-orig/archival/libipkg/pkg_extract.c busybox-1.2.0+ipkg-0
+
+ return 0;
+}
-diff -ruN busybox-1.2.0-orig/archival/libipkg/pkg_extract.h busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg_extract.h
---- busybox-1.2.0-orig/archival/libipkg/pkg_extract.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg_extract.h 2006-07-22 16:31:25.000000000 +0200
+diff -ruN busybox-1.3.1-orig/archival/libipkg/pkg_extract.h busybox-1.3.1-911/archival/libipkg/pkg_extract.h
+--- busybox-1.3.1-orig/archival/libipkg/pkg_extract.h 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.3.1-911/archival/libipkg/pkg_extract.h 2006-12-27 19:41:04.000000000 +0100
@@ -0,0 +1,32 @@
+/* pkg_extract.c - the itsy package management system
+
@@ -11150,9 +11105,9 @@ diff -ruN busybox-1.2.0-orig/archival/libipkg/pkg_extract.h busybox-1.2.0+ipkg-0
+int pkg_extract_data_file_names_to_stream(pkg_t *pkg, FILE *file);
+
+#endif
-diff -ruN busybox-1.2.0-orig/archival/libipkg/pkg.h busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg.h
---- busybox-1.2.0-orig/archival/libipkg/pkg.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg.h 2006-07-22 16:31:25.000000000 +0200
+diff -ruN busybox-1.3.1-orig/archival/libipkg/pkg.h busybox-1.3.1-911/archival/libipkg/pkg.h
+--- busybox-1.3.1-orig/archival/libipkg/pkg.h 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.3.1-911/archival/libipkg/pkg.h 2006-12-27 19:41:04.000000000 +0100
@@ -0,0 +1,232 @@
+/* pkg.h - the itsy package management system
+
@@ -11386,9 +11341,9 @@ diff -ruN busybox-1.2.0-orig/archival/libipkg/pkg.h busybox-1.2.0+ipkg-0.99.162/
+int pkg_write_changed_filelists(ipkg_conf_t *conf);
+
+#endif
-diff -ruN busybox-1.2.0-orig/archival/libipkg/pkg_hash.c busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg_hash.c
---- busybox-1.2.0-orig/archival/libipkg/pkg_hash.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg_hash.c 2006-07-22 16:31:25.000000000 +0200
+diff -ruN busybox-1.3.1-orig/archival/libipkg/pkg_hash.c busybox-1.3.1-911/archival/libipkg/pkg_hash.c
+--- busybox-1.3.1-orig/archival/libipkg/pkg_hash.c 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.3.1-911/archival/libipkg/pkg_hash.c 2006-12-27 19:41:04.000000000 +0100
@@ -0,0 +1,617 @@
+/* ipkg_hash.c - the itsy package management system
+
@@ -12007,9 +11962,9 @@ diff -ruN busybox-1.2.0-orig/archival/libipkg/pkg_hash.c busybox-1.2.0+ipkg-0.99
+}
+
+
-diff -ruN busybox-1.2.0-orig/archival/libipkg/pkg_hash.h busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg_hash.h
---- busybox-1.2.0-orig/archival/libipkg/pkg_hash.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg_hash.h 2006-07-22 16:31:25.000000000 +0200
+diff -ruN busybox-1.3.1-orig/archival/libipkg/pkg_hash.h busybox-1.3.1-911/archival/libipkg/pkg_hash.h
+--- busybox-1.3.1-orig/archival/libipkg/pkg_hash.h 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.3.1-911/archival/libipkg/pkg_hash.h 2006-12-27 19:41:04.000000000 +0100
@@ -0,0 +1,61 @@
+/* pkg_hash.h - the itsy package management system
+
@@ -12072,9 +12027,9 @@ diff -ruN busybox-1.2.0-orig/archival/libipkg/pkg_hash.h busybox-1.2.0+ipkg-0.99
+
+#endif
+
-diff -ruN busybox-1.2.0-orig/archival/libipkg/pkg_parse.c busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg_parse.c
---- busybox-1.2.0-orig/archival/libipkg/pkg_parse.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg_parse.c 2006-07-22 16:31:25.000000000 +0200
+diff -ruN busybox-1.3.1-orig/archival/libipkg/pkg_parse.c busybox-1.3.1-911/archival/libipkg/pkg_parse.c
+--- busybox-1.3.1-orig/archival/libipkg/pkg_parse.c 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.3.1-911/archival/libipkg/pkg_parse.c 2006-12-27 19:41:04.000000000 +0100
@@ -0,0 +1,366 @@
+/* pkg_parse.c - the itsy package management system
+
@@ -12442,9 +12397,9 @@ diff -ruN busybox-1.2.0-orig/archival/libipkg/pkg_parse.c busybox-1.2.0+ipkg-0.9
+
+ return 0;
+}
-diff -ruN busybox-1.2.0-orig/archival/libipkg/pkg_parse.h busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg_parse.h
---- busybox-1.2.0-orig/archival/libipkg/pkg_parse.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg_parse.h 2006-07-22 16:31:25.000000000 +0200
+diff -ruN busybox-1.3.1-orig/archival/libipkg/pkg_parse.h busybox-1.3.1-911/archival/libipkg/pkg_parse.h
+--- busybox-1.3.1-orig/archival/libipkg/pkg_parse.h 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.3.1-911/archival/libipkg/pkg_parse.h 2006-12-27 19:41:04.000000000 +0100
@@ -0,0 +1,31 @@
+/* pkg_parse.h - the itsy package management system
+
@@ -12477,9 +12432,9 @@ diff -ruN busybox-1.2.0-orig/archival/libipkg/pkg_parse.h busybox-1.2.0+ipkg-0.9
+int pkg_valorize_other_field(pkg_t *pkg, char ***raw);
+
+#endif
-diff -ruN busybox-1.2.0-orig/archival/libipkg/pkg_src.c busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg_src.c
---- busybox-1.2.0-orig/archival/libipkg/pkg_src.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg_src.c 2006-07-22 16:31:25.000000000 +0200
+diff -ruN busybox-1.3.1-orig/archival/libipkg/pkg_src.c busybox-1.3.1-911/archival/libipkg/pkg_src.c
+--- busybox-1.3.1-orig/archival/libipkg/pkg_src.c 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.3.1-911/archival/libipkg/pkg_src.c 2006-12-27 19:41:04.000000000 +0100
@@ -0,0 +1,43 @@
+/* pkg_src.c - the itsy package management system
+
@@ -12524,9 +12479,9 @@ diff -ruN busybox-1.2.0-orig/archival/libipkg/pkg_src.c busybox-1.2.0+ipkg-0.99.
+}
+
+
-diff -ruN busybox-1.2.0-orig/archival/libipkg/pkg_src.h busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg_src.h
---- busybox-1.2.0-orig/archival/libipkg/pkg_src.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg_src.h 2006-07-22 16:31:25.000000000 +0200
+diff -ruN busybox-1.3.1-orig/archival/libipkg/pkg_src.h busybox-1.3.1-911/archival/libipkg/pkg_src.h
+--- busybox-1.3.1-orig/archival/libipkg/pkg_src.h 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.3.1-911/archival/libipkg/pkg_src.h 2006-12-27 19:41:04.000000000 +0100
@@ -0,0 +1,34 @@
+/* pkg_src.h - the itsy package management system
+
@@ -12562,9 +12517,9 @@ diff -ruN busybox-1.2.0-orig/archival/libipkg/pkg_src.h busybox-1.2.0+ipkg-0.99.
+void pkg_src_deinit(pkg_src_t *src);
+
+#endif
-diff -ruN busybox-1.2.0-orig/archival/libipkg/pkg_src_list.c busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg_src_list.c
---- busybox-1.2.0-orig/archival/libipkg/pkg_src_list.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg_src_list.c 2006-07-22 16:31:25.000000000 +0200
+diff -ruN busybox-1.3.1-orig/archival/libipkg/pkg_src_list.c busybox-1.3.1-911/archival/libipkg/pkg_src_list.c
+--- busybox-1.3.1-orig/archival/libipkg/pkg_src_list.c 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.3.1-911/archival/libipkg/pkg_src_list.c 2006-12-27 19:41:04.000000000 +0100
@@ -0,0 +1,75 @@
+/* pkg_src_list.c - the itsy package management system
+
@@ -12641,9 +12596,9 @@ diff -ruN busybox-1.2.0-orig/archival/libipkg/pkg_src_list.c busybox-1.2.0+ipkg-
+{
+ return (pkg_src_list_elt_t *) void_list_pop((void_list_t *) list);
+}
-diff -ruN busybox-1.2.0-orig/archival/libipkg/pkg_src_list.h busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg_src_list.h
---- busybox-1.2.0-orig/archival/libipkg/pkg_src_list.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg_src_list.h 2006-07-22 16:31:25.000000000 +0200
+diff -ruN busybox-1.3.1-orig/archival/libipkg/pkg_src_list.h busybox-1.3.1-911/archival/libipkg/pkg_src_list.h
+--- busybox-1.3.1-orig/archival/libipkg/pkg_src_list.h 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.3.1-911/archival/libipkg/pkg_src_list.h 2006-12-27 19:41:04.000000000 +0100
@@ -0,0 +1,57 @@
+/* pkg_src_list.h - the itsy package management system
+
@@ -12702,9 +12657,9 @@ diff -ruN busybox-1.2.0-orig/archival/libipkg/pkg_src_list.h busybox-1.2.0+ipkg-
+
+#endif
+
-diff -ruN busybox-1.2.0-orig/archival/libipkg/pkg_vec.c busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg_vec.c
---- busybox-1.2.0-orig/archival/libipkg/pkg_vec.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg_vec.c 2006-07-22 16:31:26.000000000 +0200
+diff -ruN busybox-1.3.1-orig/archival/libipkg/pkg_vec.c busybox-1.3.1-911/archival/libipkg/pkg_vec.c
+--- busybox-1.3.1-orig/archival/libipkg/pkg_vec.c 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.3.1-911/archival/libipkg/pkg_vec.c 2006-12-27 19:41:04.000000000 +0100
@@ -0,0 +1,230 @@
+/* pkg_vec.c - the itsy package management system
+
@@ -12936,9 +12891,9 @@ diff -ruN busybox-1.2.0-orig/archival/libipkg/pkg_vec.c busybox-1.2.0+ipkg-0.99.
+ qsort(vec->pkgs, vec->len, sizeof(pkg_t *), (compare_fcn_t)compar);
+}
+
-diff -ruN busybox-1.2.0-orig/archival/libipkg/pkg_vec.h busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg_vec.h
---- busybox-1.2.0-orig/archival/libipkg/pkg_vec.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg_vec.h 2006-07-22 16:31:26.000000000 +0200
+diff -ruN busybox-1.3.1-orig/archival/libipkg/pkg_vec.h busybox-1.3.1-911/archival/libipkg/pkg_vec.h
+--- busybox-1.3.1-orig/archival/libipkg/pkg_vec.h 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.3.1-911/archival/libipkg/pkg_vec.h 2006-12-27 19:41:04.000000000 +0100
@@ -0,0 +1,62 @@
+/* pkg_vec.h - the itsy package management system
+
@@ -13002,9 +12957,9 @@ diff -ruN busybox-1.2.0-orig/archival/libipkg/pkg_vec.h busybox-1.2.0+ipkg-0.99.
+void abstract_pkg_vec_sort(pkg_vec_t *vec, int (*compar)(abstract_pkg_t *, abstract_pkg_t *));
+#endif
+
-diff -ruN busybox-1.2.0-orig/archival/libipkg/sprintf_alloc.h busybox-1.2.0+ipkg-0.99.162/archival/libipkg/sprintf_alloc.h
---- busybox-1.2.0-orig/archival/libipkg/sprintf_alloc.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/sprintf_alloc.h 2006-07-22 16:31:26.000000000 +0200
+diff -ruN busybox-1.3.1-orig/archival/libipkg/sprintf_alloc.h busybox-1.3.1-911/archival/libipkg/sprintf_alloc.h
+--- busybox-1.3.1-orig/archival/libipkg/sprintf_alloc.h 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.3.1-911/archival/libipkg/sprintf_alloc.h 2006-12-28 02:28:27.000000000 +0100
@@ -0,0 +1,25 @@
+/* sprintf_alloca.c -- like sprintf with memory allocation
+
@@ -13028,12 +12983,12 @@ diff -ruN busybox-1.2.0-orig/archival/libipkg/sprintf_alloc.h busybox-1.2.0+ipkg
+
+#include "libbb.h"
+
-+#define sprintf_alloc(str, fmt, args...) *str = bb_xasprintf(fmt, ## args)
++#define sprintf_alloc(str, fmt, args...) *str = xasprintf(fmt, ## args)
+
+#endif
-diff -ruN busybox-1.2.0-orig/archival/libipkg/str_list.c busybox-1.2.0+ipkg-0.99.162/archival/libipkg/str_list.c
---- busybox-1.2.0-orig/archival/libipkg/str_list.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/str_list.c 2006-07-22 16:31:26.000000000 +0200
+diff -ruN busybox-1.3.1-orig/archival/libipkg/str_list.c busybox-1.3.1-911/archival/libipkg/str_list.c
+--- busybox-1.3.1-orig/archival/libipkg/str_list.c 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.3.1-911/archival/libipkg/str_list.c 2006-12-27 19:41:04.000000000 +0100
@@ -0,0 +1,76 @@
+/* str_list.c - the itsy package management system
+
@@ -13111,9 +13066,9 @@ diff -ruN busybox-1.2.0-orig/archival/libipkg/str_list.c busybox-1.2.0+ipkg-0.99
+ (void *)target_str,
+ (void_list_cmp_t)strcmp);
+}
-diff -ruN busybox-1.2.0-orig/archival/libipkg/str_list.h busybox-1.2.0+ipkg-0.99.162/archival/libipkg/str_list.h
---- busybox-1.2.0-orig/archival/libipkg/str_list.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/str_list.h 2006-07-22 16:31:26.000000000 +0200
+diff -ruN busybox-1.3.1-orig/archival/libipkg/str_list.h busybox-1.3.1-911/archival/libipkg/str_list.h
+--- busybox-1.3.1-orig/archival/libipkg/str_list.h 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.3.1-911/archival/libipkg/str_list.h 2006-12-27 19:41:04.000000000 +0100
@@ -0,0 +1,51 @@
+/* str_list.h - the itsy package management system
+
@@ -13166,9 +13121,9 @@ diff -ruN busybox-1.2.0-orig/archival/libipkg/str_list.h busybox-1.2.0+ipkg-0.99
+char *str_list_remove_elt(str_list_t *list, const char *target_str);
+
+#endif
-diff -ruN busybox-1.2.0-orig/archival/libipkg/str_util.c busybox-1.2.0+ipkg-0.99.162/archival/libipkg/str_util.c
---- busybox-1.2.0-orig/archival/libipkg/str_util.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/str_util.c 2006-07-22 16:31:26.000000000 +0200
+diff -ruN busybox-1.3.1-orig/archival/libipkg/str_util.c busybox-1.3.1-911/archival/libipkg/str_util.c
+--- busybox-1.3.1-orig/archival/libipkg/str_util.c 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.3.1-911/archival/libipkg/str_util.c 2006-12-27 19:41:04.000000000 +0100
@@ -0,0 +1,73 @@
+/* str_utils.c - the itsy package management system
+
@@ -13243,9 +13198,9 @@ diff -ruN busybox-1.2.0-orig/archival/libipkg/str_util.c busybox-1.2.0+ipkg-0.99
+ return str ? strdup(str) : NULL;
+}
+
-diff -ruN busybox-1.2.0-orig/archival/libipkg/str_util.h busybox-1.2.0+ipkg-0.99.162/archival/libipkg/str_util.h
---- busybox-1.2.0-orig/archival/libipkg/str_util.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/str_util.h 2006-07-22 16:31:26.000000000 +0200
+diff -ruN busybox-1.3.1-orig/archival/libipkg/str_util.h busybox-1.3.1-911/archival/libipkg/str_util.h
+--- busybox-1.3.1-orig/archival/libipkg/str_util.h 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.3.1-911/archival/libipkg/str_util.h 2006-12-27 19:41:04.000000000 +0100
@@ -0,0 +1,28 @@
+/* str_utils.h - the itsy package management system
+
@@ -13275,9 +13230,9 @@ diff -ruN busybox-1.2.0-orig/archival/libipkg/str_util.h busybox-1.2.0+ipkg-0.99
+char *str_dup_safe(const char *str);
+
+#endif
-diff -ruN busybox-1.2.0-orig/archival/libipkg/user.c busybox-1.2.0+ipkg-0.99.162/archival/libipkg/user.c
---- busybox-1.2.0-orig/archival/libipkg/user.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/user.c 2006-07-22 16:31:26.000000000 +0200
+diff -ruN busybox-1.3.1-orig/archival/libipkg/user.c busybox-1.3.1-911/archival/libipkg/user.c
+--- busybox-1.3.1-orig/archival/libipkg/user.c 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.3.1-911/archival/libipkg/user.c 2006-12-27 19:41:04.000000000 +0100
@@ -0,0 +1,58 @@
+/* user.c - the itsy package management system
+
@@ -13337,9 +13292,9 @@ diff -ruN busybox-1.2.0-orig/archival/libipkg/user.c busybox-1.2.0+ipkg-0.99.162
+
+ return response;
+}
-diff -ruN busybox-1.2.0-orig/archival/libipkg/user.h busybox-1.2.0+ipkg-0.99.162/archival/libipkg/user.h
---- busybox-1.2.0-orig/archival/libipkg/user.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/user.h 2006-07-22 16:31:26.000000000 +0200
+diff -ruN busybox-1.3.1-orig/archival/libipkg/user.h busybox-1.3.1-911/archival/libipkg/user.h
+--- busybox-1.3.1-orig/archival/libipkg/user.h 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.3.1-911/archival/libipkg/user.h 2006-12-27 19:41:04.000000000 +0100
@@ -0,0 +1,23 @@
+/* user.c - the itsy package management system
+
@@ -13364,9 +13319,9 @@ diff -ruN busybox-1.2.0-orig/archival/libipkg/user.h busybox-1.2.0+ipkg-0.99.162
+
+char *get_user_response(const char *format, ...);
+
-diff -ruN busybox-1.2.0-orig/archival/libipkg/void_list.c busybox-1.2.0+ipkg-0.99.162/archival/libipkg/void_list.c
---- busybox-1.2.0-orig/archival/libipkg/void_list.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/void_list.c 2006-07-22 16:31:26.000000000 +0200
+diff -ruN busybox-1.3.1-orig/archival/libipkg/void_list.c busybox-1.3.1-911/archival/libipkg/void_list.c
+--- busybox-1.3.1-orig/archival/libipkg/void_list.c 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.3.1-911/archival/libipkg/void_list.c 2006-12-27 19:41:04.000000000 +0100
@@ -0,0 +1,194 @@
+/* void_list.c - the itsy package management system
+
@@ -13562,9 +13517,9 @@ diff -ruN busybox-1.2.0-orig/archival/libipkg/void_list.c busybox-1.2.0+ipkg-0.9
+ else
+ return NULL;
+}
-diff -ruN busybox-1.2.0-orig/archival/libipkg/void_list.h busybox-1.2.0+ipkg-0.99.162/archival/libipkg/void_list.h
---- busybox-1.2.0-orig/archival/libipkg/void_list.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/void_list.h 2006-07-22 16:31:26.000000000 +0200
+diff -ruN busybox-1.3.1-orig/archival/libipkg/void_list.h busybox-1.3.1-911/archival/libipkg/void_list.h
+--- busybox-1.3.1-orig/archival/libipkg/void_list.h 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.3.1-911/archival/libipkg/void_list.h 2006-12-27 19:41:04.000000000 +0100
@@ -0,0 +1,59 @@
+/* void_list.h - the itsy package management system
+
@@ -13625,9 +13580,9 @@ diff -ruN busybox-1.2.0-orig/archival/libipkg/void_list.h busybox-1.2.0+ipkg-0.9
+void *void_list_remove_elt(void_list_t *list, const void *target_data, void_list_cmp_t cmp);
+
+#endif
-diff -ruN busybox-1.2.0-orig/archival/libipkg/xsystem.c busybox-1.2.0+ipkg-0.99.162/archival/libipkg/xsystem.c
---- busybox-1.2.0-orig/archival/libipkg/xsystem.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/xsystem.c 2006-07-22 16:31:26.000000000 +0200
+diff -ruN busybox-1.3.1-orig/archival/libipkg/xsystem.c busybox-1.3.1-911/archival/libipkg/xsystem.c
+--- busybox-1.3.1-orig/archival/libipkg/xsystem.c 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.3.1-911/archival/libipkg/xsystem.c 2006-12-27 19:41:04.000000000 +0100
@@ -0,0 +1,64 @@
+/* xsystem.c - system(3) with error messages
+
@@ -13693,9 +13648,9 @@ diff -ruN busybox-1.2.0-orig/archival/libipkg/xsystem.c busybox-1.2.0+ipkg-0.99.
+ return -1;
+}
+
-diff -ruN busybox-1.2.0-orig/archival/libipkg/xsystem.h busybox-1.2.0+ipkg-0.99.162/archival/libipkg/xsystem.h
---- busybox-1.2.0-orig/archival/libipkg/xsystem.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/xsystem.h 2006-07-22 16:31:26.000000000 +0200
+diff -ruN busybox-1.3.1-orig/archival/libipkg/xsystem.h busybox-1.3.1-911/archival/libipkg/xsystem.h
+--- busybox-1.3.1-orig/archival/libipkg/xsystem.h 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.3.1-911/archival/libipkg/xsystem.h 2006-12-27 19:41:04.000000000 +0100
@@ -0,0 +1,34 @@
+/* xsystem.h - system(3) with error messages
+
@@ -13731,10 +13686,10 @@ diff -ruN busybox-1.2.0-orig/archival/libipkg/xsystem.h busybox-1.2.0+ipkg-0.99.
+
+#endif
+
-diff -ruN busybox-1.2.0-orig/archival/libunarchive/data_extract_all.c busybox-1.2.0+ipkg-0.99.162/archival/libunarchive/data_extract_all.c
---- busybox-1.2.0-orig/archival/libunarchive/data_extract_all.c 2006-07-01 00:42:04.000000000 +0200
-+++ busybox-1.2.0+ipkg-0.99.162/archival/libunarchive/data_extract_all.c 2006-07-22 16:31:26.000000000 +0200
-@@ -126,3 +126,17 @@
+diff -ruN busybox-1.3.1-orig/archival/libunarchive/data_extract_all.c busybox-1.3.1-911/archival/libunarchive/data_extract_all.c
+--- busybox-1.3.1-orig/archival/libunarchive/data_extract_all.c 2006-12-27 05:53:54.000000000 +0100
++++ busybox-1.3.1-911/archival/libunarchive/data_extract_all.c 2006-12-27 19:41:04.000000000 +0100
+@@ -117,3 +117,17 @@
utime(file_header->name, &t);
}
}
@@ -13752,43 +13707,32 @@ diff -ruN busybox-1.2.0-orig/archival/libunarchive/data_extract_all.c busybox-1.
+ }
+}
+
-diff -ruN busybox-1.2.0-orig/archival/libunarchive/Makefile.in busybox-1.2.0+ipkg-0.99.162/archival/libunarchive/Makefile.in
---- busybox-1.2.0-orig/archival/libunarchive/Makefile.in 2006-07-01 00:42:03.000000000 +0200
-+++ busybox-1.2.0+ipkg-0.99.162/archival/libunarchive/Makefile.in 2006-07-22 16:31:26.000000000 +0200
-@@ -58,6 +58,7 @@
- LIBUNARCHIVE-$(CONFIG_FEATURE_DEB_TAR_LZMA) += decompress_unlzma.o get_header_tar_lzma.o
- LIBUNARCHIVE-$(CONFIG_GUNZIP) += $(GUNZIP_FILES)
- LIBUNARCHIVE-$(CONFIG_FEATURE_GUNZIP_UNCOMPRESS) += decompress_uncompress.o
-+LIBUNARCHIVE-$(CONFIG_IPKG) += $(GUNZIP_FILES) get_header_tar.o get_header_tar_gz.o
- LIBUNARCHIVE-$(CONFIG_RPM2CPIO) += $(GUNZIP_FILES) get_header_cpio.o
- LIBUNARCHIVE-$(CONFIG_RPM) += $(GUNZIP_FILES) get_header_cpio.o
- LIBUNARCHIVE-$(CONFIG_TAR) += get_header_tar.o
-diff -ruN busybox-1.2.0-orig/archival/Makefile.in busybox-1.2.0+ipkg-0.99.162/archival/Makefile.in
---- busybox-1.2.0-orig/archival/Makefile.in 2006-07-01 00:42:04.000000000 +0200
-+++ busybox-1.2.0+ipkg-0.99.162/archival/Makefile.in 2006-07-22 16:31:25.000000000 +0200
-@@ -20,6 +20,7 @@
- ARCHIVAL-$(CONFIG_DPKG_DEB) += dpkg_deb.o
- ARCHIVAL-$(CONFIG_GUNZIP) += gunzip.o
- ARCHIVAL-$(CONFIG_GZIP) += gzip.o
-+ARCHIVAL-$(CONFIG_IPKG) += ipkg.o
- ARCHIVAL-$(CONFIG_RPM2CPIO) += rpm2cpio.o
- ARCHIVAL-$(CONFIG_RPM) += rpm.o
- ARCHIVAL-$(CONFIG_TAR) += tar.o
-diff -ruN busybox-1.2.0-orig/include/applets.h busybox-1.2.0+ipkg-0.99.162/include/applets.h
---- busybox-1.2.0-orig/include/applets.h 2006-07-01 00:42:10.000000000 +0200
-+++ busybox-1.2.0+ipkg-0.99.162/include/applets.h 2006-07-22 16:35:35.000000000 +0200
-@@ -152,6 +152,7 @@
+diff -ruN busybox-1.3.1-orig/archival/libunarchive/Kbuild busybox-1.3.1-911/archival/libunarchive/Kbuild
+--- busybox-1.3.1-orig/archival/libunarchive/Kbuild 2006-12-27 05:53:54.000000000 +0100
++++ busybox-1.3.1-911/archival/libunarchive/Kbuild 2006-12-27 19:50:13.000000000 +0100
+@@ -47,6 +47,7 @@
+ lib-$(CONFIG_FEATURE_DEB_TAR_LZMA) += decompress_unlzma.o get_header_tar_lzma.o
+ lib-$(CONFIG_GUNZIP) += $(GUNZIP_FILES)
+ lib-$(CONFIG_FEATURE_GUNZIP_UNCOMPRESS) += decompress_uncompress.o
++lib-$(CONFIG_IPKG) += $(GUNZIP_FILES) get_header_tar.o get_header_tar_gz.o
+ lib-$(CONFIG_RPM2CPIO) += $(GUNZIP_FILES) get_header_cpio.o
+ lib-$(CONFIG_RPM) += $(GUNZIP_FILES) get_header_cpio.o
+ lib-$(CONFIG_TAR) += get_header_tar.o
+diff -ruN busybox-1.3.1-orig/include/applets.h busybox-1.3.1-911/include/applets.h
+--- busybox-1.3.1-orig/include/applets.h 2006-12-27 05:56:18.000000000 +0100
++++ busybox-1.3.1-911/include/applets.h 2006-12-27 19:41:59.000000000 +0100
+@@ -162,6 +162,7 @@
USE_IPCALC(APPLET(ipcalc, _BB_DIR_BIN, _BB_SUID_NEVER))
USE_IPCRM(APPLET(ipcrm, _BB_DIR_USR_BIN, _BB_SUID_ALWAYS))
USE_IPCS(APPLET(ipcs, _BB_DIR_USR_BIN, _BB_SUID_ALWAYS))
+USE_IPKG(APPLET(ipkg, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
USE_IPLINK(APPLET(iplink, _BB_DIR_BIN, _BB_SUID_NEVER))
USE_IPROUTE(APPLET(iproute, _BB_DIR_BIN, _BB_SUID_NEVER))
- USE_IPTUNNEL(APPLET(iptunnel, _BB_DIR_BIN, _BB_SUID_NEVER))
-diff -ruN busybox-1.2.0-orig/include/unarchive.h busybox-1.2.0+ipkg-0.99.162/include/unarchive.h
---- busybox-1.2.0-orig/include/unarchive.h 2006-07-01 00:42:10.000000000 +0200
-+++ busybox-1.2.0+ipkg-0.99.162/include/unarchive.h 2006-07-22 16:31:26.000000000 +0200
-@@ -77,6 +77,7 @@
+ USE_IPRULE(APPLET(iprule, _BB_DIR_BIN, _BB_SUID_NEVER))
+diff -ruN busybox-1.3.1-orig/include/unarchive.h busybox-1.3.1-911/include/unarchive.h
+--- busybox-1.3.1-orig/include/unarchive.h 2006-12-27 05:56:18.000000000 +0100
++++ busybox-1.3.1-911/include/unarchive.h 2006-12-27 19:41:59.000000000 +0100
+@@ -75,6 +75,7 @@
extern void data_skip(archive_handle_t *archive_handle);
extern void data_extract_all(archive_handle_t *archive_handle);
@@ -13796,12 +13740,12 @@ diff -ruN busybox-1.2.0-orig/include/unarchive.h busybox-1.2.0+ipkg-0.99.162/inc
extern void data_extract_to_stdout(archive_handle_t *archive_handle);
extern void data_extract_to_buffer(archive_handle_t *archive_handle);
-diff -ruN busybox-1.2.0-orig/include/usage.h busybox-1.2.0+ipkg-0.99.162/include/usage.h
---- busybox-1.2.0-orig/include/usage.h 2006-07-01 00:42:10.000000000 +0200
-+++ busybox-1.2.0+ipkg-0.99.162/include/usage.h 2006-07-22 16:31:26.000000000 +0200
-@@ -982,6 +982,82 @@
- "$ ls -la /tmp/busybox*\n" \
- "-rw-rw-r-- 1 andersen andersen 554058 Apr 14 17:49 /tmp/busybox.tar.gz\n"
+diff -ruN busybox-1.3.1-orig/include/usage.h busybox-1.3.1-911/include/usage.h
+--- busybox-1.3.1-orig/include/usage.h 2006-12-27 05:56:18.000000000 +0100
++++ busybox-1.3.1-911/include/usage.h 2006-12-27 19:41:59.000000000 +0100
+@@ -1101,6 +1101,82 @@
+ "$ ls -la /tmp/busybox*\n" \
+ "-rw-rw-r-- 1 andersen andersen 554058 Apr 14 17:49 /tmp/busybox.tar.gz\n"
+#define ipkg_trivial_usage \
+ "[options]... sub-command [arguments]..."
@@ -13880,17 +13824,16 @@ diff -ruN busybox-1.2.0-orig/include/usage.h busybox-1.2.0+ipkg-0.99.162/include
+ "\teg: ipkg info 'libstd*' or ipkg search '*libop*' or ipkg remove 'libncur*'\n"
+
#define halt_trivial_usage \
- "[-d<delay>] [-n<nosync>] [-f<force>]"
+ "[-d<delay>] [-n<nosync>] [-f<force>]"
#define halt_full_usage \
-diff -ruN busybox-1.2.0-orig/Makefile busybox-1.2.0+ipkg-0.99.162/Makefile
---- busybox-1.2.0-orig/Makefile 2006-07-01 00:42:13.000000000 +0200
-+++ busybox-1.2.0+ipkg-0.99.162/Makefile 2006-07-22 16:31:25.000000000 +0200
-@@ -31,7 +31,7 @@
- export srctree=$(top_srcdir)
- vpath %/Config.in $(srctree)
+diff -ruN busybox-1.3.1-orig/Makefile busybox-1.3.1-911/Makefile
+--- busybox-1.3.1-orig/Makefile 2006-12-27 05:57:17.000000000 +0100
++++ busybox-1.3.1-911/Makefile 2006-12-28 01:14:49.000000000 +0100
+@@ -423,6 +423,7 @@
--DIRS:=applets archival archival/libunarchive coreutils console-tools \
-+DIRS:=applets archival archival/libipkg archival/libunarchive coreutils console-tools \
- debianutils editors findutils init miscutils modutils networking \
- networking/libiproute networking/udhcp procps loginutils shell \
- sysklogd util-linux e2fsprogs libpwdgrp coreutils/libcoreutils libbb
+ libs-y := \
+ archival/ \
++ archival/libipkg/ \
+ archival/libunarchive/ \
+ console-tools/ \
+ coreutils/ \
diff --git a/package/busybox/patches/913-libbb_hash.patch b/package/busybox/patches/913-libbb_hash.patch
index a7c2291caa..dc29bb05c0 100644
--- a/package/busybox/patches/913-libbb_hash.patch
+++ b/package/busybox/patches/913-libbb_hash.patch
@@ -5,10 +5,10 @@
#
# expose (again) an hash_fd function (used in 911-ipkg.patch)
#
-diff -ruN busybox-1.2.0-orig/coreutils/md5_sha1_sum.c busybox-1.2.0-libbb_hash/coreutils/md5_sha1_sum.c
---- busybox-1.2.0-orig/coreutils/md5_sha1_sum.c 2006-07-01 00:42:07.000000000 +0200
-+++ busybox-1.2.0-libbb_hash/coreutils/md5_sha1_sum.c 2006-07-22 17:08:02.000000000 +0200
-@@ -16,79 +16,10 @@
+diff -ruN busybox-1.3.1-orig/coreutils/md5_sha1_sum.c busybox-1.3.1-913/coreutils/md5_sha1_sum.c
+--- busybox-1.3.1-orig/coreutils/md5_sha1_sum.c 2006-12-27 05:54:50.000000000 +0100
++++ busybox-1.3.1-913/coreutils/md5_sha1_sum.c 2006-12-28 00:59:35.000000000 +0100
+@@ -8,78 +8,10 @@
#include "busybox.h"
@@ -20,17 +20,14 @@ diff -ruN busybox-1.2.0-orig/coreutils/md5_sha1_sum.c busybox-1.2.0-libbb_hash/c
-/* This might be useful elsewhere */
-static unsigned char *hash_bin_to_hex(unsigned char *hash_value,
-- unsigned char hash_length)
+- unsigned hash_length)
-{
-- int x, len, max;
-- unsigned char *hex_value;
--
-- max = (hash_length * 2) + 2;
-- hex_value = xmalloc(max);
-- for (x = len = 0; x < hash_length; x++) {
-- len += snprintf((char*)(hex_value + len), max - len, "%02x", hash_value[x]);
+- int len = 0;
+- char *hex_value = xmalloc((hash_length * 2) + 2);
+- while (hash_length--) {
+- len += sprintf(hex_value + len, "%02x", *hash_value++);
- }
-- return (hex_value);
+- return hex_value;
-}
-
-static uint8_t *hash_file(const char *filename, hash_algo_t hash_algo)
@@ -45,11 +42,13 @@ diff -ruN busybox-1.2.0-orig/coreutils/md5_sha1_sum.c busybox-1.2.0-libbb_hash/c
- void (*update)(const void*, size_t, void*);
- void (*final)(void*, void*);
-
-- if (strcmp(filename, "-") == 0) {
-- src_fd = STDIN_FILENO;
-- } else if(0 > (src_fd = open(filename, O_RDONLY))) {
-- bb_perror_msg("%s", filename);
-- return NULL;
+- src_fd = STDIN_FILENO;
+- if (filename[0] != '-' || filename[1]) { /* not "-" */
+- src_fd = open(filename, O_RDONLY);
+- if (src_fd < 0) {
+- bb_perror_msg("%s", filename);
+- return NULL;
+- }
- }
-
- /* figure specific hash algorithims */
@@ -67,7 +66,7 @@ diff -ruN busybox-1.2.0-orig/coreutils/md5_sha1_sum.c busybox-1.2.0-libbb_hash/c
- bb_error_msg_and_die("algorithm not supported");
- }
-
-- while (0 < (count = read(src_fd, in_buf, 4096))) {
+- while (0 < (count = safe_read(src_fd, in_buf, 4096))) {
- update(in_buf, count, &context);
- }
-
@@ -85,22 +84,22 @@ diff -ruN busybox-1.2.0-orig/coreutils/md5_sha1_sum.c busybox-1.2.0-libbb_hash/c
- return hash_value;
-}
-
- /* This could become a common function for md5 as well, by using md5_stream */
- static int hash_files(int argc, char **argv, hash_algo_t hash_algo)
+ int md5_sha1_sum_main(int argc, char **argv)
{
-diff -ruN busybox-1.2.0-orig/include/libbb.h busybox-1.2.0-libbb_hash/include/libbb.h
---- busybox-1.2.0-orig/include/libbb.h 2006-07-01 00:42:10.000000000 +0200
-+++ busybox-1.2.0-libbb_hash/include/libbb.h 2006-07-22 17:01:06.000000000 +0200
-@@ -518,6 +518,8 @@
- extern int get_terminal_width_height(int fd, int *width, int *height);
- extern unsigned long get_ug_id(const char *s, long (*__bb_getxxnam)(const char *));
+ int return_value = EXIT_SUCCESS;
+diff -ruN busybox-1.3.1-orig/include/libbb.h busybox-1.3.1-913/include/libbb.h
+--- busybox-1.3.1-orig/include/libbb.h 2006-12-27 05:56:18.000000000 +0100
++++ busybox-1.3.1-913/include/libbb.h 2006-12-27 23:25:52.000000000 +0100
+@@ -528,6 +528,8 @@
+ extern const char bb_uuenc_tbl_std[];
+ void bb_uuencode(const unsigned char *s, char *store, const int length, const char *tbl);
+typedef enum { HASH_SHA1, HASH_MD5 } hash_algo_t;
+
- typedef struct _sha1_ctx_t_ {
+ typedef struct sha1_ctx_t {
uint32_t count[2];
uint32_t hash[5];
-@@ -542,6 +544,10 @@
+@@ -550,6 +552,10 @@
void md5_hash(const void *data, size_t length, md5_ctx_t *ctx);
void *md5_end(void *resbuf, md5_ctx_t *ctx);
@@ -108,13 +107,13 @@ diff -ruN busybox-1.2.0-orig/include/libbb.h busybox-1.2.0-libbb_hash/include/li
+int hash_fd(int fd, hash_algo_t hash_algo, uint8_t *hash_value);
+uint8_t *hash_file(const char *filename, hash_algo_t hash_algo);
+
- extern uint32_t *bb_crc32_filltable (int endian);
+ uint32_t *crc32_filltable(int endian);
+
- #ifndef RB_POWER_OFF
-diff -ruN busybox-1.2.0-orig/libbb/hash.c busybox-1.2.0-libbb_hash/libbb/hash.c
---- busybox-1.2.0-orig/libbb/hash.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.2.0-libbb_hash/libbb/hash.c 2006-07-22 17:07:34.000000000 +0200
-@@ -0,0 +1,100 @@
+diff -ruN busybox-1.3.1-orig/libbb/hash.c busybox-1.3.1-913/libbb/hash.c
+--- busybox-1.3.1-orig/libbb/hash.c 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.3.1-913/libbb/hash.c 2006-12-28 00:48:52.000000000 +0100
+@@ -0,0 +1,99 @@
+/*
+ * Copyright (C) 2003 Glenn L. McGrath
+ * Copyright (C) 2003-2004 Erik Andersen
@@ -134,15 +133,12 @@ diff -ruN busybox-1.2.0-orig/libbb/hash.c busybox-1.2.0-libbb_hash/libbb/hash.c
+
+unsigned char *hash_bin_to_hex(unsigned char *hash_value, unsigned char hash_length)
+{
-+ int x, len, max;
-+ unsigned char *hex_value;
-+
-+ max = (hash_length * 2) + 2;
-+ hex_value = xmalloc(max);
-+ for (x = len = 0; x < hash_length; x++) {
-+ len += snprintf((char*)(hex_value + len), max - len, "%02x", hash_value[x]);
++ int len = 0;
++ char *hex_value = xmalloc((hash_length * 2) + 2);
++ while (hash_length--) {
++ len += sprintf(hex_value + len, "%02x", *hash_value++);
+ }
-+ return (hex_value);
++ return hex_value;
+}
+
+int hash_fd(int fd, hash_algo_t hash_algo, uint8_t *hash_value)
@@ -168,7 +164,7 @@ diff -ruN busybox-1.2.0-orig/libbb/hash.c busybox-1.2.0-libbb_hash/libbb/hash.c
+ }
+
+
-+ while (0 < (count = read(fd, in_buf, sizeof in_buf))) {
++ while (0 < (count = safe_read(fd, in_buf, sizeof in_buf))) {
+ update(in_buf, count, &context);
+ result += count;
+ }
@@ -196,11 +192,13 @@ diff -ruN busybox-1.2.0-orig/libbb/hash.c busybox-1.2.0-libbb_hash/libbb/hash.c
+ bb_error_msg_and_die("algotithm not supported");
+ }
+
-+ if (strcmp(filename, "-") == 0) {
-+ src_fd = STDIN_FILENO;
-+ } else if (0 > (src_fd = open(filename, O_RDONLY))) {
-+ bb_perror_msg("%s", filename);
-+ return NULL;
++ src_fd = STDIN_FILENO;
++ if (filename[0] != '-' || filename[1]) { /* not "-" */
++ src_fd = open(filename, O_RDONLY);
++ if (src_fd < 0) {
++ bb_perror_msg("%s", filename);
++ return NULL;
++ }
+ }
+
+ if (hash_fd(src_fd, hash_algo, hash_buf) > 0) {
@@ -215,14 +213,14 @@ diff -ruN busybox-1.2.0-orig/libbb/hash.c busybox-1.2.0-libbb_hash/libbb/hash.c
+
+ return hash_value;
+}
-diff -ruN busybox-1.2.0-orig/libbb/Makefile.in busybox-1.2.0-libbb_hash/libbb/Makefile.in
---- busybox-1.2.0-orig/libbb/Makefile.in 2006-07-01 00:42:08.000000000 +0200
-+++ busybox-1.2.0-libbb_hash/libbb/Makefile.in 2006-07-22 16:51:47.000000000 +0200
-@@ -11,6 +11,7 @@
-
- LIBBB-n:=
- LIBBB-y:= \
-+ hash.c \
- bb_asprintf.c ask_confirmation.c change_identity.c chomp.c \
- compare_string_array.c concat_path_file.c copy_file.c copyfd.c \
- crc32.c create_icmp_socket.c create_icmp6_socket.c \
+diff -ruN busybox-1.3.1-orig/libbb/Kbuild busybox-1.3.1-913/libbb/Kbuild
+--- busybox-1.3.1-orig/libbb/Kbuild 2006-12-27 05:55:04.000000000 +0100
++++ busybox-1.3.1-913/libbb/Kbuild 2006-12-27 23:31:20.000000000 +0100
+@@ -37,6 +37,7 @@
+ lib-y += get_last_path_component.o
+ lib-y += get_line_from_file.o
+ lib-y += getopt32.o
++lib-y += hash.o
+ lib-y += herror_msg.o
+ lib-y += herror_msg_and_die.o
+ lib-y += human_readable.o