[-]
[+]
|
Changed |
busybox.spec
|
|
[-]
[+]
|
Added |
busybox-1.15.2-ash.patch
^
|
@@ -0,0 +1,1136 @@
+diff -urpN busybox-1.15.2/shell/ash.c busybox-1.15.2-ash/shell/ash.c
+--- busybox-1.15.2/shell/ash.c 2009-10-08 03:18:15.000000000 +0200
++++ busybox-1.15.2-ash/shell/ash.c 2009-12-04 04:17:52.000000000 +0100
+@@ -258,9 +258,6 @@ static void trace_vprintf(const char *fm
+ /* ============ Utility functions */
+ #define xbarrier() do { __asm__ __volatile__ ("": : :"memory"); } while (0)
+
+-/* C99 says: "char" declaration may be signed or unsigned by default */
+-#define signed_char2int(sc) ((int)(signed char)(sc))
+-
+ static int isdigit_str9(const char *str)
+ {
+ int maxlen = 9 + 1; /* max 9 digits: 999999999 */
+@@ -718,17 +715,17 @@ trace_puts_quoted(char *s)
+ return;
+ putc('"', tracefile);
+ for (p = s; *p; p++) {
+- switch (*p) {
+- case '\n': c = 'n'; goto backslash;
+- case '\t': c = 't'; goto backslash;
+- case '\r': c = 'r'; goto backslash;
+- case '"': c = '"'; goto backslash;
+- case '\\': c = '\\'; goto backslash;
+- case CTLESC: c = 'e'; goto backslash;
+- case CTLVAR: c = 'v'; goto backslash;
+- case CTLVAR+CTLQUOTE: c = 'V'; goto backslash;
+- case CTLBACKQ: c = 'q'; goto backslash;
+- case CTLBACKQ+CTLQUOTE: c = 'Q'; goto backslash;
++ switch ((unsigned char)*p) {
++ case '\n': c = 'n'; goto backslash;
++ case '\t': c = 't'; goto backslash;
++ case '\r': c = 'r'; goto backslash;
++ case '\"': c = '\"'; goto backslash;
++ case '\\': c = '\\'; goto backslash;
++ case CTLESC: c = 'e'; goto backslash;
++ case CTLVAR: c = 'v'; goto backslash;
++ case CTLVAR+CTLQUOTE: c = 'V'; goto backslash;
++ case CTLBACKQ: c = 'q'; goto backslash;
++ case CTLBACKQ+CTLQUOTE: c = 'Q'; goto backslash;
+ backslash:
+ putc('\\', tracefile);
+ putc(c, tracefile);
+@@ -738,8 +735,8 @@ trace_puts_quoted(char *s)
+ putc(*p, tracefile);
+ else {
+ putc('\\', tracefile);
+- putc(*p >> 6 & 03, tracefile);
+- putc(*p >> 3 & 07, tracefile);
++ putc((*p >> 6) & 03, tracefile);
++ putc((*p >> 3) & 07, tracefile);
+ putc(*p & 07, tracefile);
+ }
+ break;
+@@ -823,7 +820,7 @@ sharg(union node *arg, FILE *fp)
+ {
+ char *p;
+ struct nodelist *bqlist;
+- int subtype;
++ unsigned char subtype;
+
+ if (arg->type != NARG) {
+ out1fmt("<node type %d>\n", arg->type);
+@@ -831,7 +828,7 @@ sharg(union node *arg, FILE *fp)
+ }
+ bqlist = arg->narg.backquote;
+ for (p = arg->narg.text; *p; p++) {
+- switch (*p) {
++ switch ((unsigned char)*p) {
+ case CTLESC:
+ putc(*++p, fp);
+ break;
+@@ -1581,21 +1578,21 @@ single_quote(const char *s)
+
+ STADJUST(q - p, p);
+
+- len = strspn(s, "'");
+- if (!len)
++ if (*s != '\'')
+ break;
++ len = 0;
++ do len++; while (*++s == '\'');
+
+ q = p = makestrspace(len + 3, p);
+
+ *q++ = '"';
+- q = (char *)memcpy(q, s, len) + len;
++ q = (char *)memcpy(q, s - len, len) + len;
+ *q++ = '"';
+- s += len;
+
+ STADJUST(q - p, p);
+ } while (*s);
+
+- USTPUTC(0, p);
++ USTPUTC('\0', p);
+
+ return stackblock();
+ }
+@@ -2603,14 +2600,10 @@ pwdcmd(int argc UNUSED_PARAM, char **arg
+ #define CIGN 14 /* character should be ignored */
+
+ #if ENABLE_ASH_ALIAS
+-#define SYNBASE 130
+-#define PEOF -130
+-#define PEOA -129
+-#define PEOA_OR_PEOF PEOA
++# define PEOA 256
++# define PEOF 257
+ #else
+-#define SYNBASE 129
+-#define PEOF -129
+-#define PEOA_OR_PEOF PEOF
++# define PEOF 256
+ #endif
+
+ /* number syntax index */
+@@ -2621,14 +2614,14 @@ pwdcmd(int argc UNUSED_PARAM, char **arg
+ #define PSSYNTAX 4 /* prompt */
+
+ #if ENABLE_ASH_OPTIMIZE_FOR_SIZE
+-#define USE_SIT_FUNCTION
++# define USE_SIT_FUNCTION
+ #endif
+
+ #if ENABLE_SH_MATH_SUPPORT
+-static const char S_I_T[][4] = {
+-#if ENABLE_ASH_ALIAS
++static const uint8_t S_I_T[][4] = {
++# if ENABLE_ASH_ALIAS
+ { CSPCL, CIGN, CIGN, CIGN }, /* 0, PEOA */
+-#endif
++# endif
+ { CSPCL, CWORD, CWORD, CWORD }, /* 1, ' ' */
+ { CNL, CNL, CNL, CNL }, /* 2, \n */
+ { CWORD, CCTL, CCTL, CWORD }, /* 3, !*-/:=?[]~ */
+@@ -2640,17 +2633,17 @@ static const char S_I_T[][4] = {
+ { CBACK, CBACK, CCTL, CBACK }, /* 9, \ */
+ { CBQUOTE, CBQUOTE, CWORD, CBQUOTE }, /* 10, ` */
+ { CENDVAR, CENDVAR, CWORD, CENDVAR }, /* 11, } */
+-#ifndef USE_SIT_FUNCTION
++# ifndef USE_SIT_FUNCTION
+ { CENDFILE, CENDFILE, CENDFILE, CENDFILE }, /* 12, PEOF */
+ { CWORD, CWORD, CWORD, CWORD }, /* 13, 0-9A-Za-z */
+ { CCTL, CCTL, CCTL, CCTL } /* 14, CTLESC ... */
+-#endif
++# endif
+ };
+ #else
+-static const char S_I_T[][3] = {
+-#if ENABLE_ASH_ALIAS
++static const uint8_t S_I_T[][3] = {
++# if ENABLE_ASH_ALIAS
+ { CSPCL, CIGN, CIGN }, /* 0, PEOA */
+-#endif
++# endif
+ { CSPCL, CWORD, CWORD }, /* 1, ' ' */
+ { CNL, CNL, CNL }, /* 2, \n */
+ { CWORD, CCTL, CCTL }, /* 3, !*-/:=?[]~ */
+@@ -2662,46 +2655,50 @@ static const char S_I_T[][3] = {
+ { CBACK, CBACK, CCTL }, /* 9, \ */
+ { CBQUOTE, CBQUOTE, CWORD }, /* 10, ` */
+ { CENDVAR, CENDVAR, CWORD }, /* 11, } */
+-#ifndef USE_SIT_FUNCTION
++# ifndef USE_SIT_FUNCTION
+ { CENDFILE, CENDFILE, CENDFILE }, /* 12, PEOF */
+ { CWORD, CWORD, CWORD }, /* 13, 0-9A-Za-z */
+ { CCTL, CCTL, CCTL } /* 14, CTLESC ... */
+-#endif
++# endif
+ };
+ #endif /* SH_MATH_SUPPORT */
+
++/* c in SIT(c, syntax) must be an *unsigned char* or PEOA or PEOF,
++ * caller must ensure proper cast on it if c is *char_ptr!
++ */
++
+ #ifdef USE_SIT_FUNCTION
+
+ static int
+ SIT(int c, int syntax)
+ {
+ static const char spec_symbls[] ALIGN1 = "\t\n !\"$&'()*-/:;<=>?[\\]`|}~";
+-#if ENABLE_ASH_ALIAS
+- static const char syntax_index_table[] ALIGN1 = {
++# if ENABLE_ASH_ALIAS
++ static const uint8_t syntax_index_table[] ALIGN1 = {
+ 1, 2, 1, 3, 4, 5, 1, 6, /* "\t\n !\"$&'" */
+ 7, 8, 3, 3, 3, 3, 1, 1, /* "()*-/:;<" */
+ 3, 1, 3, 3, 9, 3, 10, 1, /* "=>?[\\]`|" */
+ 11, 3 /* "}~" */
+ };
+-#else
+- static const char syntax_index_table[] ALIGN1 = {
++# else
++ static const uint8_t syntax_index_table[] ALIGN1 = {
+ 0, 1, 0, 2, 3, 4, 0, 5, /* "\t\n !\"$&'" */
+ 6, 7, 2, 2, 2, 2, 0, 0, /* "()*-/:;<" */
+ 2, 0, 2, 2, 8, 2, 9, 0, /* "=>?[\\]`|" */
+ 10, 2 /* "}~" */
|
[-]
[+]
|
Added |
busybox-1.15.2-awk.patch
^
|
@@ -0,0 +1,48 @@
+diff -urpN busybox-1.15.2/editors/awk.c busybox-1.15.2-awk/editors/awk.c
+--- busybox-1.15.2/editors/awk.c 2009-10-08 02:59:09.000000000 +0200
++++ busybox-1.15.2-awk/editors/awk.c 2009-11-30 02:05:12.000000000 +0100
+@@ -2393,12 +2393,14 @@ static var *evaluate(node *op, var *res)
+
+ case XC( OC_MOVE ):
+ /* if source is a temporary string, jusk relink it to dest */
+- if (R.v == v1+1 && R.v->string) {
+- res = setvar_p(L.v, R.v->string);
+- R.v->string = NULL;
+- } else {
++//Disabled: if R.v is numeric but happens to have cached R.v->string,
++//then L.v ends up being a string, which is wrong
++// if (R.v == v1+1 && R.v->string) {
++// res = setvar_p(L.v, R.v->string);
++// R.v->string = NULL;
++// } else {
+ res = copyvar(L.v, R.v);
+- }
++// }
+ break;
+
+ case XC( OC_TERNARY ):
+diff -urpN busybox-1.15.2/testsuite/awk.tests busybox-1.15.2-awk/testsuite/awk.tests
+--- busybox-1.15.2/testsuite/awk.tests 2009-09-26 15:14:57.000000000 +0200
++++ busybox-1.15.2-awk/testsuite/awk.tests 2009-11-30 02:05:12.000000000 +0100
+@@ -47,4 +47,21 @@ testing "awk NF in BEGIN" \
+ ":0::::\n" \
+ "" ""
+
++prg='
++function b(tmp) {
++ tmp = 0;
++ print "" tmp; #this line causes the bug
++ return tmp;
++}
++function c(tmpc) {
++ tmpc = b(); return tmpc;
++}
++BEGIN {
++ print (c() ? "string" : "number");
++}'
++testing "awk string cast (bug 725)" \
++ "awk '$prg'" \
++ "0\nnumber\n" \
++ "" ""
++
+ exit $FAILCOUNT
|
[-]
[+]
|
Added |
busybox-1.15.2-buildsys.patch
^
|
@@ -0,0 +1,92 @@
+diff -urpN busybox-1.15.2/Makefile busybox-1.15.2-buildsys/Makefile
+--- busybox-1.15.2/Makefile 2009-10-08 03:06:38.000000000 +0200
++++ busybox-1.15.2-buildsys/Makefile 2009-11-28 23:38:39.000000000 +0100
+@@ -358,6 +358,15 @@ scripts_basic:
+ # To avoid any implicit rule to kick in, define an empty command.
+ scripts/basic/%: scripts_basic ;
+
++# bbox: we have helpers in applets/
++# we depend on scripts_basic, since scripts/basic/fixdep
++# must be built before any other host prog
++PHONY += applets_dir
++applets_dir: scripts_basic
++ $(Q)$(MAKE) $(build)=applets
++
++applets/%: applets_dir ;
++
+ PHONY += outputmakefile
+ # outputmakefile generates a Makefile in the output directory, if using a
+ # separate output directory. This allows convenient use of make in the
+@@ -797,7 +806,7 @@ ifneq ($(KBUILD_MODULES),)
+ $(Q)rm -f $(MODVERDIR)/*
+ endif
+
+-archprepare: prepare1 scripts_basic
++archprepare: prepare1 scripts_basic applets_dir
+
+ prepare0: archprepare FORCE
+ $(Q)$(MAKE) $(build)=.
+diff -urpN busybox-1.15.2/scripts/kconfig/Makefile busybox-1.15.2-buildsys/scripts/kconfig/Makefile
+--- busybox-1.15.2/scripts/kconfig/Makefile 2009-09-26 15:14:57.000000000 +0200
++++ busybox-1.15.2-buildsys/scripts/kconfig/Makefile 2009-11-28 23:38:39.000000000 +0100
+@@ -17,11 +17,28 @@ menuconfig: $(obj)/mconf
+ config: $(obj)/conf
+ $< Config.in
+
++# Mtime granularity problem.
++# It was observed that these commands:
++# make allnoconfig; sed -i -e '/CONFIG_TRUE/s/.*/CONFIG_TRUE=y/' .config; make
++# sometimes produce busybox with "true" applet still disabled.
++# This is caused by .config updated by sed having mtime which is still
++# equal to (not bigger than) include/autoconf.h's mtime,
++# and thus 2nd make does not regenerate include/autoconf.h.
++# Waiting for 1 second after non-interactive "make XXXXconfig"
++# prevents this from happening.
++#
++# We'd like to detect whether filesystem we are on has coarse mtimes,
++# but can't do it yet, bbox ls hasn't got --full-time.
++#MTIME_IS_COARSE:=@ls --full-time -ld | grep -F .000 >/dev/null
++MTIME_IS_COARSE:=@true
++
+ oldconfig: $(obj)/conf
+ $< -o Config.in
++ $(MTIME_IS_COARSE) && sleep 1
+
+ silentoldconfig: $(obj)/conf
+ $< -s Config.in
++ $(MTIME_IS_COARSE) && sleep 1
+
+ update-po-config: $(obj)/kxgettext
+ xgettext --default-domain=linux \
+@@ -46,15 +63,19 @@ PHONY += randconfig allyesconfig allnoco
+
+ randconfig: $(obj)/conf
+ $< -r Config.in
++ $(MTIME_IS_COARSE) && sleep 1
+
+ allyesconfig: $(obj)/conf
+ $< -y Config.in
++ $(MTIME_IS_COARSE) && sleep 1
+
+ allnoconfig: $(obj)/conf
+ $< -n Config.in
++ $(MTIME_IS_COARSE) && sleep 1
+
+ allmodconfig: $(obj)/conf
+ $< -m Config.in
++ $(MTIME_IS_COARSE) && sleep 1
+
+ defconfig: $(obj)/conf
+ ifeq ($(KBUILD_DEFCONFIG),)
+@@ -63,9 +84,11 @@ else
+ @echo *** Default configuration is based on '$(KBUILD_DEFCONFIG)'
+ $(Q)$< -D $(KBUILD_DEFCONFIG) Config.in
+ endif
++ $(MTIME_IS_COARSE) && sleep 1
+
+ %_defconfig: $(obj)/conf
+ $(Q)$< -D $@ Config.in
++ $(MTIME_IS_COARSE) && sleep 1
+
+ # Help text used by make help
+ help:
|
[-]
[+]
|
Added |
busybox-1.15.2-flash.patch
^
|
@@ -0,0 +1,84 @@
+diff -urpN busybox-1.15.2/miscutils/flash_eraseall.c busybox-1.15.2-flash/miscutils/flash_eraseall.c
+--- busybox-1.15.2/miscutils/flash_eraseall.c 2009-09-26 15:14:57.000000000 +0200
++++ busybox-1.15.2-flash/miscutils/flash_eraseall.c 2009-11-29 00:01:46.000000000 +0100
+@@ -12,22 +12,35 @@
+
+ #include "libbb.h"
+ #include <mtd/mtd-user.h>
+-#include <mtd/jffs2-user.h>
++#include <linux/jffs2.h>
+
+ #define OPTION_J (1 << 0)
+ #define OPTION_Q (1 << 1)
+ #define IS_NAND (1 << 2)
+ #define BBTEST (1 << 3)
+
+-struct globals {
+- /* This is used in the cpu_to_je/je_to_cpu macros in jffs2_user.h */
+- int tgt_endian;
+-};
+-#define G (*(struct globals*)&bb_common_bufsiz1)
+-#define target_endian (G.tgt_endian)
+-#define INIT_G() do { \
+- target_endian = __BYTE_ORDER; \
+-} while (0)
++/* mtd/jffs2-user.h used to have this atrocity:
++extern int target_endian;
++
++#define t16(x) ({ __u16 __b = (x); (target_endian==__BYTE_ORDER)?__b:bswap_16(__b); })
++#define t32(x) ({ __u32 __b = (x); (target_endian==__BYTE_ORDER)?__b:bswap_32(__b); })
++
++#define cpu_to_je16(x) ((jint16_t){t16(x)})
++#define cpu_to_je32(x) ((jint32_t){t32(x)})
++#define cpu_to_jemode(x) ((jmode_t){t32(x)})
++
++#define je16_to_cpu(x) (t16((x).v16))
++#define je32_to_cpu(x) (t32((x).v32))
++#define jemode_to_cpu(x) (t32((x).m))
++
++but mtd/jffs2-user.h is gone now (at least 2.6.31.6 does not have it anymore)
++*/
++
++/* We always use native endianness */
++#undef cpu_to_je16
++#undef cpu_to_je32
++#define cpu_to_je16(v) ((jint16_t){(v)})
++#define cpu_to_je32(v) ((jint32_t){(v)})
+
+ static uint32_t crc32(uint32_t val, const void *ss, int len,
+ uint32_t *crc32_table)
+@@ -40,9 +53,11 @@ static uint32_t crc32(uint32_t val, cons
+
+ static void show_progress(mtd_info_t *meminfo, erase_info_t *erase)
+ {
+- printf("\rErasing %d Kibyte @ %x -- %2llu %% complete.",
+- (unsigned)meminfo->erasesize / 1024, erase->start,
+- (unsigned long long) erase->start * 100 / meminfo->size);
++ printf("\rErasing %u Kibyte @ %x - %2u%% complete.",
++ (unsigned)meminfo->erasesize / 1024,
++ erase->start,
++ (unsigned) ((unsigned long long) erase->start * 100 / meminfo->size)
++ );
+ fflush(stdout);
+ }
+
+@@ -57,17 +72,15 @@ int flash_eraseall_main(int argc UNUSED_
+ unsigned int flags;
+ char *mtd_name;
+
+- INIT_G();
+ opt_complementary = "=1";
+ flags = BBTEST | getopt32(argv, "jq");
+
+ mtd_name = argv[optind];
+- xstat(mtd_name, &st);
++ fd = xopen(mtd_name, O_RDWR);
++ fstat(fd, &st);
+ if (!S_ISCHR(st.st_mode))
+ bb_error_msg_and_die("%s: not a char device", mtd_name);
+
+- fd = xopen(mtd_name, O_RDWR);
+-
+ xioctl(fd, MEMGETINFO, &meminfo);
+ erase.length = meminfo.erasesize;
+ if (meminfo.type == MTD_NANDFLASH)
|
[-]
[+]
|
Added |
busybox-1.15.2-grep.patch
^
|
@@ -0,0 +1,25 @@
+diff -urpN busybox-1.15.2/findutils/grep.c busybox-1.15.2-grep/findutils/grep.c
+--- busybox-1.15.2/findutils/grep.c 2009-09-26 15:14:57.000000000 +0200
++++ busybox-1.15.2-grep/findutils/grep.c 2009-12-04 02:46:43.000000000 +0100
+@@ -377,6 +377,8 @@ static int grep_file(FILE *file)
+ print_line(line + gl->matched_range.rm_so,
+ end - gl->matched_range.rm_so,
+ linenum, ':');
++ if (old == '\0')
++ break;
+ line[end] = old;
+ #if !ENABLE_EXTRA_COMPAT
+ if (regexec(&gl->compiled_regex, line + end,
+diff -urpN busybox-1.15.2/testsuite/grep.tests busybox-1.15.2-grep/testsuite/grep.tests
+--- busybox-1.15.2/testsuite/grep.tests 2009-09-26 15:14:57.000000000 +0200
++++ busybox-1.15.2-grep/testsuite/grep.tests 2009-12-04 02:46:43.000000000 +0100
+@@ -90,4 +90,9 @@ testing "grep -E -o prints all matches"
+ "00:19:3E:00:AA:5E\n00:1D:60:3D:3A:FB\n00:22:43:49:FB:AA\n" \
+ "" "00:19:3E:00:AA:5E 00:1D:60:3D:3A:FB 00:22:43:49:FB:AA\n"
+
++testing "grep -o does not loop forever" \
++ 'grep -o "[^/]*$"' \
++ "test\n" \
++ "" "/var/test\n"
++
+ exit $FAILCOUNT
|
[-]
[+]
|
Added |
busybox-1.15.2-ping.patch
^
|
@@ -0,0 +1,100 @@
+diff -urpN busybox-1.15.2/include/platform.h busybox-1.15.2-ping/include/platform.h
+--- busybox-1.15.2/include/platform.h 2009-09-26 15:14:57.000000000 +0200
++++ busybox-1.15.2-ping/include/platform.h 2009-11-28 23:48:41.000000000 +0100
+@@ -174,12 +174,14 @@ char *strchrnul(const char *s, int c);
+ * a lvalue. This makes it more likely to not swap them by mistake
+ */
+ #if defined(i386) || defined(__x86_64__)
++# define move_from_unaligned_int(v, intp) ((v) = *(int*)(intp))
+ # define move_from_unaligned16(v, u16p) ((v) = *(uint16_t*)(u16p))
+ # define move_from_unaligned32(v, u32p) ((v) = *(uint32_t*)(u32p))
+ # define move_to_unaligned32(u32p, v) (*(uint32_t*)(u32p) = (v))
+ /* #elif ... - add your favorite arch today! */
+ #else
+ /* performs reasonably well (gcc usually inlines memcpy here) */
++# define move_from_unaligned_int(v, intp) (memcpy(&(v), (intp), sizeof(int)))
+ # define move_from_unaligned16(v, u16p) (memcpy(&(v), (u16p), 2))
+ # define move_from_unaligned32(v, u32p) (memcpy(&(v), (u32p), 4))
+ # define move_to_unaligned32(u32p, v) do { \
+diff -urpN busybox-1.15.2/networking/ping.c busybox-1.15.2-ping/networking/ping.c
+--- busybox-1.15.2/networking/ping.c 2009-09-26 15:14:57.000000000 +0200
++++ busybox-1.15.2-ping/networking/ping.c 2009-11-28 23:48:41.000000000 +0100
+@@ -173,13 +173,14 @@ static void ping6(len_and_sockaddr *lsa)
+ }
+ #endif
+
+-int ping_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
+-int ping_main(int argc UNUSED_PARAM, char **argv)
++#if !ENABLE_PING6
++# define common_ping_main(af, argv) common_ping_main(argv)
++#endif
++static int common_ping_main(sa_family_t af, char **argv)
+ {
+ len_and_sockaddr *lsa;
+-#if ENABLE_PING6
+- sa_family_t af = AF_UNSPEC;
+
++#if ENABLE_PING6
+ while ((++argv)[0] && argv[0][0] == '-') {
+ if (argv[0][1] == '4') {
+ af = AF_INET;
+@@ -689,7 +690,8 @@ static void ping6(len_and_sockaddr *lsa)
+ /* don't check len - we trust the kernel: */
+ /* && mp->cmsg_len >= CMSG_LEN(sizeof(int)) */
+ ) {
+- hoplimit = *(int*)CMSG_DATA(mp);
++ /*hoplimit = *(int*)CMSG_DATA(mp); - unaligned access */
++ move_from_unaligned_int(hoplimit, CMSG_DATA(mp));
+ }
+ }
+ unpack6(packet, c, /*&from,*/ hoplimit);
+@@ -716,18 +718,16 @@ static void ping(len_and_sockaddr *lsa)
+ ping4(lsa);
+ }
+
+-int ping_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
+-int ping_main(int argc UNUSED_PARAM, char **argv)
++static int common_ping_main(int opt, char **argv)
+ {
+ len_and_sockaddr *lsa;
+ char *str_s;
+- int opt;
+
+ INIT_G();
+
+ /* exactly one argument needed; -v and -q don't mix; -c NUM, -w NUM, -W NUM */
+ opt_complementary = "=1:q--v:v--q:c+:w+:W+";
+- opt = getopt32(argv, OPT_STRING, &pingcount, &str_s, &deadline, &timeout, &str_I);
++ opt |= getopt32(argv, OPT_STRING, &pingcount, &str_s, &deadline, &timeout, &str_I);
+ if (opt & OPT_s)
+ datalen = xatou16(str_s); // -s
+ if (opt & OPT_I) { // -I
+@@ -765,13 +765,25 @@ int ping_main(int argc UNUSED_PARAM, cha
+ #endif /* FEATURE_FANCY_PING */
+
+
++int ping_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
++int ping_main(int argc UNUSED_PARAM, char **argv)
++{
++#if !ENABLE_FEATURE_FANCY_PING
++ return common_ping_main(AF_UNSPEC, argv);
++#else
++ return common_ping_main(0, argv);
++#endif
++}
++
+ #if ENABLE_PING6
+ int ping6_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
+ int ping6_main(int argc UNUSED_PARAM, char **argv)
+ {
+- argv[0] = (char*)"-6";
+- return ping_main(0 /* argc+1 - but it's unused anyway */,
+- argv - 1);
++# if !ENABLE_FEATURE_FANCY_PING
++ return common_ping_main(AF_INET6, argv);
++# else
++ return common_ping_main(OPT_IPV6, argv);
++# endif
+ }
+ #endif
+
|
[-]
[+]
|
Added |
busybox-1.15.2-split.patch
^
|
@@ -0,0 +1,18 @@
+diff -urpN busybox-1.15.2/coreutils/split.c busybox-1.15.2-split/coreutils/split.c
+--- busybox-1.15.2/coreutils/split.c 2009-10-08 02:59:09.000000000 +0200
++++ busybox-1.15.2-split/coreutils/split.c 2009-11-30 21:09:20.000000000 +0100
+@@ -79,9 +79,13 @@ int split_main(int argc UNUSED_PARAM, ch
+
+ argv += optind;
+ if (argv[0]) {
++ int fd;
+ if (argv[1])
+ sfx = argv[1];
+- xmove_fd(xopen(argv[0], O_RDONLY), 0);
++ fd = open_or_warn_stdin(argv[0]);
++ if (fd == -1)
++ return EXIT_FAILURE;
++ xmove_fd(fd, STDIN_FILENO);
+ } else {
+ argv[0] = (char *) bb_msg_standard_input;
+ }
|
[-]
[+]
|
Added |
busybox-1.15.2-udhcp-services.patch
^
|
@@ -0,0 +1,24 @@
+--- networking/udhcp/options.c.orig 2009-06-22 00:40:29.000000000 +0200
++++ networking/udhcp/options.c 2009-08-02 13:40:59.000000000 +0200
+@@ -45,6 +45,10 @@
+ { OPTION_STRING , 0x42 }, /* tftp */
+ { OPTION_STRING , 0x43 }, /* bootfile */
+ { OPTION_STRING , 0x4D }, /* userclass */
++ { OPTION_IP | OPTION_LIST , 0x45 }, /* DHCP_SMTP_SERVER */
++ { OPTION_IP | OPTION_LIST , 0x46 }, /* DHCP_POP3_SERVER */
++ { OPTION_IP | OPTION_LIST , 0x4a }, /* DHCP_IRC_SERVER */
++ { OPTION_IP | OPTION_LIST , 0x48 }, /* DHCP_WWW_SERVER */
+ #if ENABLE_FEATURE_UDHCP_RFC3397
+ { OPTION_STR1035 | OPTION_LIST , 0x77 }, /* search */
+ #endif
+@@ -94,6 +98,10 @@
+ "tftp" "\0"
+ "bootfile" "\0"
+ "userclass" "\0"
++ "smtpsrv" "\0" /* DHCP_SMTP_SERVER */
++ "pop3srv" "\0" /* DHCP_POP3_SERVER */
++ "ircsrv" "\0" /* DHCP_IRC_SERVER */
++ "wwwsrv" "\0" /* DHCP_WWW_SERVER */
+ #if ENABLE_FEATURE_UDHCP_RFC3397
+ "search" "\0"
+ #endif
|
|
Added |
busybox-1.15.2.tar.bz2
^
|