[-]
[+]
|
Changed |
busybox.spec
|
|
[-]
[+]
|
Deleted |
busybox-1.11.0-dmesg-size.patch
^
|
@@ -1,26 +0,0 @@
---- util-linux/dmesg.c.orig 2008-06-25 14:51:38.000000000 +0200
-+++ util-linux/dmesg.c 2008-07-06 10:12:12.000000000 +0200
-@@ -12,6 +12,14 @@
- #include <sys/klog.h>
- #include "libbb.h"
-
-+static int kernel_ringbuffer_size(void)
-+{
-+ int len = klogctl(10, NULL, 0);
-+ if (len > 0)
-+ return len;
-+ return 16384;
-+}
-+
- int dmesg_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
- int dmesg_main(int argc ATTRIBUTE_UNUSED, char **argv)
- {
-@@ -31,7 +39,7 @@
- return EXIT_SUCCESS;
- }
-
-- len = (flags & OPT_s) ? xatoul_range(size, 2, INT_MAX) : 16384;
-+ len = (flags & OPT_s) ? xatoul_range(size, 2, INT_MAX) : kernel_ringbuffer_size();
- buf = xmalloc(len);
- len = klogctl(3 + (flags & OPT_c), buf, len);
- if (len < 0)
|
[-]
[+]
|
Deleted |
busybox-1.12.0-awk.patch
^
|
@@ -1,53 +0,0 @@
---- busybox-1.12.0/editors/awk.c Wed Aug 6 00:56:11 2008
-+++ busybox-1.12.0-awk/editors/awk.c Fri Aug 29 01:17:05 2008
-@@ -973,7 +973,12 @@
-
- } else if (*p == '.' || isdigit(*p)) {
- /* it's a number */
-- t_double = strtod(p, &p);
-+#if ENABLE_DESKTOP
-+ if (p[0] == '0' && (p[1] | 0x20) == 'x')
-+ t_double = strtoll(p, &p, 0);
-+ else
-+#endif
-+ t_double = strtod(p, &p);
- if (*p == '.')
- syntax_error(EMSG_UNEXP_TOKEN);
- tc = TC_NUMBER;
-@@ -2034,28 +2039,30 @@
- setvar_p(res, s);
- break;
-
-+ /* Bitwise ops must assume that operands are unsigned. GNU Awk 3.1.5:
-+ * awk '{ print or(-1,1) }' gives "4.29497e+09", not "-2.xxxe+09" */
- case B_an:
-- setvar_i(res, (long)getvar_i(av[0]) & (long)getvar_i(av[1]));
-+ setvar_i(res, (unsigned long)getvar_i(av[0]) & (unsigned long)getvar_i(av[1]));
- break;
-
- case B_co:
-- setvar_i(res, ~(long)getvar_i(av[0]));
-+ setvar_i(res, ~(unsigned long)getvar_i(av[0]));
- break;
-
- case B_ls:
-- setvar_i(res, (long)getvar_i(av[0]) << (long)getvar_i(av[1]));
-+ setvar_i(res, (unsigned long)getvar_i(av[0]) << (unsigned long)getvar_i(av[1]));
- break;
-
- case B_or:
-- setvar_i(res, (long)getvar_i(av[0]) | (long)getvar_i(av[1]));
-+ setvar_i(res, (unsigned long)getvar_i(av[0]) | (unsigned 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])));
-+ setvar_i(res, (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]));
-+ setvar_i(res, (unsigned long)getvar_i(av[0]) ^ (unsigned long)getvar_i(av[1]));
- break;
-
- case B_lo:
|
[-]
[+]
|
Deleted |
busybox-1.12.0-crontab_vi.patch
^
|
@@ -1,164 +0,0 @@
---- busybox-1.12.0/editors/vi.c Wed Aug 6 00:56:11 2008
-+++ busybox-1.12.0-crontab_vi/editors/vi.c Sun Sep 21 17:30:47 2008
-@@ -147,10 +147,10 @@
- #endif
-
- smallint editing; // >0 while we are editing a file
-- // [code audit says "can be 0 or 1 only"]
-+ // [code audit says "can be 0, 1 or 2 only"]
- smallint cmd_mode; // 0=command 1=insert 2=replace
- int file_modified; // buffer contents changed (counter, not flag!)
-- int last_file_modified; // = -1;
-+ int last_file_modified; // = -1;
- int fn_start; // index of first cmd line file name
- int save_argc; // how many file names on cmd line
- int cmdcnt; // repetition count
-@@ -623,7 +623,7 @@
- // These are commands that change text[].
- // Remember the input for the "." command
- if (!adding2q && ioq_start == NULL
-- && strchr(modifying_cmds, c)
-+ && c != '\0' && strchr(modifying_cmds, c)
- ) {
- start_new_cmd_q(c);
- }
-@@ -645,8 +645,8 @@
- }
- //-------------------------------------------------------------------
-
-- place_cursor(rows, 0, FALSE); // go to bottom of screen
-- clear_to_eol(); // Erase to end of line
-+ place_cursor(rows - 1, 0, FALSE); // go to bottom of screen
-+ clear_to_eol(); // erase to end of line
- cookmode();
- #undef cur_line
- }
-@@ -2009,9 +2009,9 @@
- {
- // get buffer for new cmd
- // if there is a current cmd count put it in the buffer first
-- if (cmdcnt > 0)
-+ if (cmdcnt > 0) {
- lmc_len = sprintf(last_modifying_cmd, "%d%c", cmdcnt, c);
-- else { // just save char c onto queue
-+ } else { // just save char c onto queue
- last_modifying_cmd[0] = c;
- lmc_len = 1;
- }
-@@ -2157,21 +2157,21 @@
- //----- Come here when we get a continue signal -------------------
- static void cont_sig(int sig UNUSED_PARAM)
- {
-- rawmode(); // terminal to "raw"
-- last_status_cksum = 0; // force status update
-- redraw(TRUE); // re-draw the screen
-+ rawmode(); // terminal to "raw"
-+ last_status_cksum = 0; // force status update
-+ redraw(TRUE); // re-draw the screen
-
- signal(SIGTSTP, suspend_sig);
- signal(SIGCONT, SIG_DFL);
-- kill(my_pid, SIGCONT);
-+ kill(my_pid, SIGCONT); // huh? why? we are already "continued"...
- }
-
- //----- Come here when we get a Suspend signal -------------------
- static void suspend_sig(int sig UNUSED_PARAM)
- {
-- place_cursor(rows - 1, 0, FALSE); // go to bottom of screen
-- clear_to_eol(); // Erase to end of line
-- cookmode(); // terminal to "cooked"
-+ place_cursor(rows - 1, 0, FALSE); // go to bottom of screen
-+ clear_to_eol(); // erase to end of line
-+ cookmode(); // terminal to "cooked"
-
- signal(SIGCONT, cont_sig);
- signal(SIGTSTP, SIG_DFL);
-@@ -2247,18 +2247,20 @@
-
- fflush(stdout);
- n = chars_to_parse;
-- // get input from User- are there already input chars in Q?
-+ // get input from User - are there already input chars in Q?
- if (n <= 0) {
- // the Q is empty, wait for a typed char
-+ again:
- n = safe_read(STDIN_FILENO, readbuffer, sizeof(readbuffer));
-- if (n < 0) {
-- if (errno == EBADF || errno == EFAULT || errno == EINVAL
-- || errno == EIO)
-- editing = 0; // want to exit
-- errno = 0;
-+ if (n <= 0) {
-+ place_cursor(rows - 1, 0, FALSE); // go to bottom of screen
-+ clear_to_eol(); // erase to end of line
-+ cookmode(); // terminal to "cooked"
-+ bb_error_msg_and_die("can't read user input");
- }
-- if (n <= 0)
-- return 0; // error
-+ /* elsewhere we can get very confused by NULs */
-+ if (readbuffer[0] == '\0')
-+ goto again;
- if (readbuffer[0] == 27) {
- // This is an ESC char. Is this Esc sequence?
- // Could be bare Esc key. See if there are any
---- busybox-1.12.0/miscutils/crontab.c Wed Aug 6 00:56:08 2008
-+++ busybox-1.12.0-crontab_vi/miscutils/crontab.c Sun Sep 21 17:30:47 2008
-@@ -93,6 +93,7 @@
- char *new_fname;
- char *user_name; /* -u USER */
- int fd;
-+ int src_fd;
- int opt_ler;
-
- /* file [opts] Replace crontab from file
-@@ -144,15 +145,15 @@
- bb_show_usage();
-
- /* Read replacement file under user's UID/GID/group vector */
-+ src_fd = STDIN_FILENO;
- if (!opt_ler) { /* Replace? */
- if (!argv[0])
- bb_show_usage();
- if (NOT_LONE_DASH(argv[0])) {
-- fd = open_as_user(pas, argv[0]);
-- if (fd < 0)
-+ src_fd = open_as_user(pas, argv[0]);
-+ if (src_fd < 0)
- bb_error_msg_and_die("user %s cannot read %s",
- pas->pw_name, argv[0]);
-- xmove_fd(fd, STDIN_FILENO);
- }
- }
-
-@@ -180,23 +181,23 @@
- tmp_fname = xasprintf("%s.%u", crontab_dir, (unsigned)getpid());
- /* No O_EXCL: we don't want to be stuck if earlier crontabs
- * were killed, leaving stale temp file behind */
-- fd = xopen3(tmp_fname, O_RDWR|O_CREAT|O_TRUNC, 0600);
-- xmove_fd(fd, STDIN_FILENO);
-- fchown(STDIN_FILENO, pas->pw_uid, pas->pw_gid);
-+ src_fd = xopen3(tmp_fname, O_RDWR|O_CREAT|O_TRUNC, 0600);
-+ fchown(src_fd, pas->pw_uid, pas->pw_gid);
- fd = open(pas->pw_name, O_RDONLY);
- if (fd >= 0) {
-- bb_copyfd_eof(fd, STDIN_FILENO);
-+ bb_copyfd_eof(fd, src_fd);
- close(fd);
-+ xlseek(src_fd, 0, SEEK_SET);
- }
-+ close_on_exec_on(src_fd); /* don't want editor to see this fd */
- edit_file(pas, tmp_fname);
-- xlseek(STDIN_FILENO, 0, SEEK_SET);
- /* fall through */
-
- case 0: /* Replace (no -l, -e, or -r were given) */
- new_fname = xasprintf("%s.new", pas->pw_name);
- fd = open(new_fname, O_WRONLY|O_CREAT|O_TRUNC|O_APPEND, 0600);
- if (fd >= 0) {
-- bb_copyfd_eof(STDIN_FILENO, fd);
-+ bb_copyfd_eof(src_fd, fd);
- close(fd);
- xrename(new_fname, pas->pw_name);
- } else {
|
[-]
[+]
|
Deleted |
busybox-1.12.0-dhcp.patch
^
|
@@ -1,15 +0,0 @@
---- busybox-1.12.0/networking/udhcp/dhcpc.c Wed Aug 6 00:55:58 2008
-+++ busybox-1.12.0-dhcp/networking/udhcp/dhcpc.c Thu Aug 28 00:05:23 2008
-@@ -259,9 +259,10 @@
- if (opt & OPT_o)
- client_config.no_default_options = 1;
- while (list_O) {
-- int n = index_in_strings(dhcp_option_strings, llist_pop(&list_O));
-+ char *optstr = llist_pop(&list_O);
-+ int n = index_in_strings(dhcp_option_strings, optstr);
- if (n < 0)
-- bb_error_msg_and_die("unknown option '%s'", list_O->data);
-+ bb_error_msg_and_die("unknown option '%s'", optstr);
- n = dhcp_options[n].code;
- client_config.opt_mask[n >> 3] |= 1 << (n & 7);
- }
|
[-]
[+]
|
Deleted |
busybox-1.12.0-dmesg-size.patch
^
|
@@ -1,26 +0,0 @@
---- util-linux/dmesg.c.orig 2008-06-25 14:51:38.000000000 +0200
-+++ util-linux/dmesg.c 2008-07-06 10:12:12.000000000 +0200
-@@ -12,6 +12,14 @@
- #include <sys/klog.h>
- #include "libbb.h"
-
-+static int kernel_ringbuffer_size(void)
-+{
-+ int len = klogctl(10, NULL, 0);
-+ if (len > 0)
-+ return len;
-+ return 16384;
-+}
-+
- int dmesg_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
- int dmesg_main(int argc ATTRIBUTE_UNUSED, char **argv)
- {
-@@ -31,7 +39,7 @@
- return EXIT_SUCCESS;
- }
-
-- len = (flags & OPT_s) ? xatoul_range(size, 2, INT_MAX) : 16384;
-+ len = (flags & OPT_s) ? xatoul_range(size, 2, INT_MAX) : kernel_ringbuffer_size();
- buf = xmalloc(len);
- len = klogctl(3 + (flags & OPT_c), buf, len);
- if (len < 0)
|
[-]
[+]
|
Deleted |
busybox-1.12.0-grep.patch
^
|
@@ -1,78 +0,0 @@
---- busybox-1.12.0/findutils/grep.c Sat Aug 9 18:14:59 2008
-+++ busybox-1.12.0-grep/findutils/grep.c Fri Sep 19 23:33:15 2008
-@@ -87,7 +87,11 @@
-
- struct globals {
- int max_matches;
-+#if !ENABLE_EXTRA_COMPAT
- int reflags;
-+#else
-+ RE_TRANSLATE_TYPE case_fold; /* RE_TRANSLATE_TYPE is [[un]signed] char* */
-+#endif
- smalluint invert_search;
- smalluint print_filename;
- smalluint open_errors;
-@@ -110,7 +114,19 @@
- }; \
- } while (0)
- #define max_matches (G.max_matches )
-+#if !ENABLE_EXTRA_COMPAT
- #define reflags (G.reflags )
-+#else
-+#define case_fold (G.case_fold )
-+/* http://www.delorie.com/gnu/docs/regex/regex_46.html */
-+#define reflags re_syntax_options
-+#undef REG_NOSUB
-+#undef REG_EXTENDED
-+#undef REG_ICASE
-+#define REG_NOSUB bug:is:here /* should not be used */
-+#define REG_EXTENDED RE_SYNTAX_EGREP
-+#define REG_ICASE bug:is:here /* should not be used */
-+#endif
- #define invert_search (G.invert_search )
- #define print_filename (G.print_filename )
- #define open_errors (G.open_errors )
-@@ -240,6 +256,7 @@
- xregcomp(&gl->compiled_regex, gl->pattern, reflags);
- #else
- memset(&gl->compiled_regex, 0, sizeof(gl->compiled_regex));
-+ gl->compiled_regex.translate = case_fold; /* for -i */
- if (re_compile_pattern(gl->pattern, strlen(gl->pattern), &gl->compiled_regex))
- bb_error_msg_and_die("bad regex '%s'", gl->pattern);
- #endif
-@@ -532,17 +549,34 @@
- if (ENABLE_FEATURE_GREP_FGREP_ALIAS && applet_name[0] == 'f')
- option_mask32 |= OPT_F;
-
-+#if !ENABLE_EXTRA_COMPAT
- if (!(option_mask32 & (OPT_o | OPT_w)))
- reflags = REG_NOSUB;
-+#endif
-
- if (ENABLE_FEATURE_GREP_EGREP_ALIAS
- && (applet_name[0] == 'e' || (option_mask32 & OPT_E))
- ) {
- reflags |= REG_EXTENDED;
- }
-+#if ENABLE_EXTRA_COMPAT
-+ else {
-+ reflags = RE_SYNTAX_GREP;
-+ }
-+#endif
-
-- if (option_mask32 & OPT_i)
-+ if (option_mask32 & OPT_i) {
-+#if !ENABLE_EXTRA_COMPAT
- reflags |= REG_ICASE;
-+#else
-+ int i;
-+ case_fold = xmalloc(256);
-+ for (i = 0; i < 256; i++)
-+ case_fold[i] = (unsigned char)i;
-+ for (i = 'a'; i <= 'z'; i++)
-+ case_fold[i] = (unsigned char)(i - ('a' - 'A'));
-+#endif
-+ }
-
- argv += optind;
- argc -= optind;
|
[-]
[+]
|
Deleted |
busybox-1.12.0-insmod.patch
^
|
@@ -1,333 +0,0 @@
---- busybox-1.12.0/modutils/insmod.c Wed Aug 6 00:56:02 2008
-+++ busybox-1.12.0-insmod/modutils/insmod.c Sun Aug 31 23:56:28 2008
-@@ -1059,8 +1059,9 @@
-
- case R_68K_PC8:
- v -= dot;
-- if ((ElfW(Sword))v > 0x7f ||
-- (ElfW(Sword))v < -(ElfW(Sword))0x80) {
-+ if ((ElfW(Sword))v > 0x7f
-+ || (ElfW(Sword))v < -(ElfW(Sword))0x80
-+ ) {
- ret = obj_reloc_overflow;
- }
- *(char *)loc = v;
-@@ -1068,8 +1069,9 @@
-
- case R_68K_PC16:
- v -= dot;
-- if ((ElfW(Sword))v > 0x7fff ||
-- (ElfW(Sword))v < -(ElfW(Sword))0x8000) {
-+ if ((ElfW(Sword))v > 0x7fff
-+ || (ElfW(Sword))v < -(ElfW(Sword))0x8000
-+ ) {
- ret = obj_reloc_overflow;
- }
- *(short *)loc = v;
-@@ -1208,8 +1210,9 @@
- {
- Elf32_Addr word;
-
-- if ((Elf32_Sword)v > 0x7fff ||
-- (Elf32_Sword)v < -(Elf32_Sword)0x8000) {
-+ if ((Elf32_Sword)v > 0x7fff
-+ || (Elf32_Sword)v < -(Elf32_Sword)0x8000
-+ ) {
- ret = obj_reloc_overflow;
- }
-
-@@ -1238,8 +1241,9 @@
- Elf32_Addr word;
-
- v -= dot + 4;
-- if ((Elf32_Sword)v > 0x7fff ||
-- (Elf32_Sword)v < -(Elf32_Sword)0x8000) {
-+ if ((Elf32_Sword)v > 0x7fff
-+ || (Elf32_Sword)v < -(Elf32_Sword)0x8000
-+ ) {
- ret = obj_reloc_overflow;
- }
-
-@@ -1253,9 +1257,10 @@
- Elf32_Addr word, gp;
- /* get _gp */
- gp = obj_symbol_final_value(f, obj_find_symbol(f, SPFX "_gp"));
-- v-=gp;
-- if ((Elf32_Sword)v > 0x7fff ||
-- (Elf32_Sword)v < -(Elf32_Sword)0x8000) {
-+ v -= gp;
-+ if ((Elf32_Sword)v > 0x7fff
-+ || (Elf32_Sword)v < -(Elf32_Sword)0x8000
-+ ) {
- ret = obj_reloc_overflow;
- }
-
-@@ -2132,7 +2137,6 @@
- for (sym = f->symtab[hash]; sym; sym = sym->next)
- if (f->symbol_cmp(sym->name, name) == 0)
- return sym;
--
- return NULL;
- }
-
-@@ -2141,12 +2145,10 @@
- if (sym) {
- if (sym->secidx >= SHN_LORESERVE)
- return sym->value;
--
- return sym->value + f->sections[sym->secidx]->header.sh_addr;
-- } else {
-- /* As a special case, a NULL sym has value zero. */
-- return 0;
- }
-+ /* As a special case, a NULL sym has value zero. */
-+ return 0;
- }
-
- static struct obj_section *obj_find_section(struct obj_file *f, const char *name)
-@@ -2156,7 +2158,6 @@
- for (i = 0; i < n; ++i)
- if (strcmp(f->sections[i]->name, name) == 0)
- return f->sections[i];
--
- return NULL;
- }
-
-@@ -2167,9 +2168,11 @@
- af = a->header.sh_flags;
-
- ac = 0;
-- if (a->name[0] != '.' || strlen(a->name) != 10 ||
-- strcmp(a->name + 5, ".init"))
-+ if (a->name[0] != '.' || strlen(a->name) != 10
-+ || strcmp(a->name + 5, ".init") != 0
-+ ) {
- ac |= 32;
-+ }
- if (af & SHF_ALLOC)
- ac |= 16;
- if (!(af & SHF_WRITE))
-@@ -2212,7 +2215,7 @@
- sec->name = name;
- sec->idx = newidx;
- if (size)
-- sec->contents = xmalloc(size);
-+ sec->contents = xzalloc(size);
-
- obj_insert_section_load_order(f, sec);
-
-@@ -2227,7 +2230,7 @@
- int newidx = f->header.e_shnum++;
- struct obj_section *sec;
-
-- f->sections = xrealloc(f->sections, (newidx + 1) * sizeof(sec));
-+ f->sections = xrealloc_vector(f->sections, 2, newidx);
- f->sections[newidx] = sec = arch_new_section();
-
- sec->header.sh_type = SHT_PROGBITS;
-@@ -2237,7 +2240,7 @@
- sec->name = name;
- sec->idx = newidx;
- if (size)
-- sec->contents = xmalloc(size);
-+ sec->contents = xzalloc(size);
-
- sec->load_next = f->load_order;
- f->load_order = sec;
-@@ -2689,8 +2692,7 @@
- /* Collect the modules' symbols. */
-
- if (nmod) {
-- ext_modules = modules = xmalloc(nmod * sizeof(*modules));
-- memset(modules, 0, nmod * sizeof(*modules));
-+ ext_modules = modules = xzalloc(nmod * sizeof(*modules));
- for (i = 0, mn = module_names, m = modules;
- i < nmod; ++i, ++m, mn += strlen(mn) + 1) {
- struct new_module_info info;
-@@ -2770,13 +2772,14 @@
- }
-
-
--static void new_create_this_module(struct obj_file *f, const char *m_name)
-+static void new_create_this_module(struct obj_file *f, const char *m_name)
- {
- struct obj_section *sec;
-
- sec = obj_create_alloced_section_first(f, ".this", tgt_sizeof_long,
- sizeof(struct new_module));
-- memset(sec->contents, 0, sizeof(struct new_module));
-+ /* done by obj_create_alloced_section_first: */
-+ /*memset(sec->contents, 0, sizeof(struct new_module));*/
-
- obj_add_symbol(f, SPFX "__this_module", -1,
- ELF_ST_INFO(STB_LOCAL, STT_OBJECT), sec->idx, 0,
-@@ -2856,18 +2859,19 @@
- /* We don't want to export symbols residing in sections that
- aren't loaded. There are a number of these created so that
- we make sure certain module options don't appear twice. */
--
-- loaded = alloca(sizeof(int) * (i = f->header.e_shnum));
-+ i = f->header.e_shnum;
-+ loaded = alloca(sizeof(int) * i);
- while (--i >= 0)
- loaded[i] = (f->sections[i]->header.sh_flags & SHF_ALLOC) != 0;
-
- for (nsyms = i = 0; i < HASH_BUCKETS; ++i) {
- struct obj_symbol *sym;
-- for (sym = f->symtab[i]; sym; sym = sym->next)
-+ for (sym = f->symtab[i]; sym; sym = sym->next) {
- if (ELF_ST_BIND(sym->info) != STB_LOCAL
- && sym->secidx <= SHN_HIRESERVE
- && (sym->secidx >= SHN_LORESERVE
-- || loaded[sym->secidx])) {
-+ || loaded[sym->secidx])
-+ ) {
- ElfW(Addr) ofs = nsyms * 2 * tgt_sizeof_void_p;
-
- obj_symbol_patch(f, sec->idx, ofs, sym);
-@@ -2876,6 +2880,7 @@
-
- nsyms++;
- }
-+ }
- }
-
- obj_extend_section(sec, nsyms * 2 * tgt_sizeof_char_p);
-@@ -2934,9 +2939,11 @@
- }
- sec = obj_find_section(f, ".data.init");
- if (sec) {
|
[-]
[+]
|
Deleted |
busybox-1.12.0-lineedit.patch
^
|
@@ -1,145 +0,0 @@
---- busybox-1.12.0/libbb/lineedit.c Wed Aug 20 02:48:13 2008
-+++ busybox-1.12.0-lineedit/libbb/lineedit.c Mon Sep 22 00:27:18 2008
-@@ -956,24 +956,33 @@
-
- #if MAX_HISTORY > 0
-
-+static void save_command_ps_at_cur_history(void)
-+{
-+ if (command_ps[0] != '\0') {
-+ int cur = state->cur_history;
-+ free(state->history[cur]);
-+ state->history[cur] = xstrdup(command_ps);
-+ }
-+}
-+
- /* state->flags is already checked to be nonzero */
--static void get_previous_history(void)
-+static int get_previous_history(void)
- {
-- if (command_ps[0] != '\0' || state->history[state->cur_history] == NULL) {
-- free(state->history[state->cur_history]);
-- state->history[state->cur_history] = xstrdup(command_ps);
-+ if ((state->flags & DO_HISTORY) && state->cur_history) {
-+ save_command_ps_at_cur_history();
-+ state->cur_history--;
-+ return 1;
- }
-- state->cur_history--;
-+ beep();
-+ return 0;
- }
-
- static int get_next_history(void)
- {
- if (state->flags & DO_HISTORY) {
-- int ch = state->cur_history;
-- if (ch < state->cnt_history) {
-- get_previous_history(); /* save the current history line */
-- state->cur_history = ch + 1;
-- return state->cur_history;
-+ if (state->cur_history < state->cnt_history) {
-+ save_command_ps_at_cur_history(); /* save the current history line */
-+ return ++state->cur_history;
- }
- }
- beep();
-@@ -995,6 +1004,7 @@
- for (hi = state->cnt_history; hi > 0;) {
- hi--;
- free(state->history[hi]);
-+ state->history[hi] = NULL;
- }
-
- for (hi = 0; hi < MAX_HISTORY;) {
-@@ -1006,7 +1016,7 @@
- l = strlen(hl);
- if (l >= MAX_LINELEN)
- hl[MAX_LINELEN-1] = '\0';
-- if (l == 0 || hl[0] == ' ') {
-+ if (l == 0) {
- free(hl);
- continue;
- }
-@@ -1043,19 +1053,27 @@
-
- if (!(state->flags & DO_HISTORY))
- return;
--
-+ if (str[0] == '\0')
-+ return;
- i = state->cnt_history;
-- free(state->history[MAX_HISTORY]);
-- state->history[MAX_HISTORY] = NULL;
-- /* After max history, remove the oldest command */
-+ /* Don't save dupes */
-+ if (i && strcmp(state->history[i-1], str) == 0)
-+ return;
-+
-+ free(state->history[MAX_HISTORY]); /* redundant, paranoia */
-+ state->history[MAX_HISTORY] = NULL; /* redundant, paranoia */
-+
-+ /* If history[] is full, remove the oldest command */
-+ /* we need to keep history[MAX_HISTORY] empty, hence >=, not > */
- if (i >= MAX_HISTORY) {
- free(state->history[0]);
- for (i = 0; i < MAX_HISTORY-1; i++)
- state->history[i] = state->history[i+1];
-+ /* i == MAX_HISTORY-1 */
- }
--// Maybe "if (!i || strcmp(history[i-1], command) != 0) ..."
--// (i.e. do not save dups?)
-+ /* i <= MAX_HISTORY-1 */
- state->history[i++] = xstrdup(str);
-+ /* i <= MAX_HISTORY */
- state->cur_history = i;
- state->cnt_history = i;
- #if ENABLE_FEATURE_EDITING_SAVEHISTORY
-@@ -1432,6 +1450,13 @@
- }
- }
- #endif
-+
-+#if 0
-+ for (ic = 0; ic <= MAX_HISTORY; ic++)
-+ bb_error_msg("history[%d]:'%s'", ic, state->history[ic]);
-+ bb_error_msg("cur_history:%d cnt_history:%d", state->cur_history, state->cnt_history);
-+#endif
-+
- /* Print out the command prompt */
- parse_and_put_prompt(prompt);
-
-@@ -1540,11 +1565,8 @@
- vi_case(CTRL('P')|vbit:)
- vi_case('k'|vbit:)
- /* Control-p -- Get previous command from history */
-- if ((state->flags & DO_HISTORY) && state->cur_history > 0) {
-- get_previous_history();
-+ if (get_previous_history())
- goto rewrite_line;
-- }
-- beep();
- break;
- #endif
-
-@@ -1733,10 +1755,8 @@
- #if MAX_HISTORY > 0
- case 'A':
- /* Up Arrow -- Get previous command from history */
-- if ((state->flags & DO_HISTORY) && state->cur_history > 0) {
-- get_previous_history();
-+ if (get_previous_history())
- goto rewrite_line;
-- }
- beep();
- break;
- case 'B':
-@@ -1746,7 +1766,7 @@
- rewrite_line:
- /* Rewrite the line with the selected history item */
- /* change command */
-- command_len = strlen(strcpy(command, state->history[state->cur_history]));
-+ command_len = strlen(strcpy(command, state->history[state->cur_history] ? : ""));
- /* redraw and go to eol (bol, in vi */
- redraw(cmdedit_y, (state->flags & VI_MODE) ? 9999 : 0);
- break;
|
[-]
[+]
|
Deleted |
busybox-1.12.0-udhcp-services.patch
^
|
@@ -1,24 +0,0 @@
---- networking/udhcp/options.c.orig 2008-07-06 10:59:58.000000000 +0200
-+++ networking/udhcp/options.c 2008-07-06 11:05:29.000000000 +0200
-@@ -43,6 +43,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_RFC3397
- { OPTION_STR1035 | OPTION_LIST , 0x77 }, /* search */
- #endif
-@@ -92,6 +96,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_RFC3397
- "search" "\0"
- #endif
|
[-]
[+]
|
Deleted |
busybox-1.14.2-df.patch
^
|
@@ -1,139 +0,0 @@
-diff -urpN busybox-1.14.2/coreutils/df.c busybox-1.14.2-df/coreutils/df.c
---- busybox-1.14.2/coreutils/df.c 2009-07-05 22:59:28.000000000 +0200
-+++ busybox-1.14.2-df/coreutils/df.c 2009-07-05 23:00:09.000000000 +0200
-@@ -44,7 +44,6 @@ int df_main(int argc, char **argv)
- FILE *mount_table;
- struct mntent *mount_entry;
- struct statfs s;
-- static const char ignored_mounts[] ALIGN1 = "rootfs\0";
-
- enum {
- OPT_KILO = (1 << 0),
-@@ -120,7 +119,7 @@ int df_main(int argc, char **argv)
- mount_point = *argv++;
- if (!mount_point)
- break;
-- mount_entry = find_mount_point(mount_point, bb_path_mtab_file);
-+ mount_entry = find_mount_point(mount_point);
- if (!mount_entry) {
- bb_error_msg("%s: can't find mount point", mount_point);
- set_error:
-@@ -154,8 +153,8 @@ int df_main(int argc, char **argv)
- ) / (blocks_used + s.f_bavail);
- }
-
-- /* GNU coreutils 6.10 skip certain mounts, try to be compatible. */
-- if (index_in_strings(device, ignored_mounts) != -1)
-+ /* GNU coreutils 6.10 skips certain mounts, try to be compatible. */
-+ if (strcmp(device, "rootfs") == 0)
- continue;
-
- #ifdef WHY_WE_DO_IT_FOR_DEV_ROOT_ONLY
-diff -urpN busybox-1.14.2/include/libbb.h busybox-1.14.2-df/include/libbb.h
---- busybox-1.14.2/include/libbb.h 2009-07-05 22:59:31.000000000 +0200
-+++ busybox-1.14.2-df/include/libbb.h 2009-07-05 23:00:09.000000000 +0200
-@@ -1025,7 +1025,7 @@ extern void run_applet_no_and_exit(int a
-
- #ifdef HAVE_MNTENT_H
- extern int match_fstype(const struct mntent *mt, const char *fstypes) FAST_FUNC;
--extern struct mntent *find_mount_point(const char *name, const char *table) FAST_FUNC;
-+extern struct mntent *find_mount_point(const char *name) FAST_FUNC;
- #endif
- extern void erase_mtab(const char * name) FAST_FUNC;
- extern unsigned int tty_baud_to_value(speed_t speed) FAST_FUNC;
-diff -urpN busybox-1.14.2/libbb/find_mount_point.c busybox-1.14.2-df/libbb/find_mount_point.c
---- busybox-1.14.2/libbb/find_mount_point.c 2009-07-05 22:59:24.000000000 +0200
-+++ busybox-1.14.2-df/libbb/find_mount_point.c 2009-07-05 23:00:09.000000000 +0200
-@@ -17,7 +17,7 @@
- * Given any other file (or directory), find the mount table entry for its
- * filesystem.
- */
--struct mntent* FAST_FUNC find_mount_point(const char *name, const char *table)
-+struct mntent* FAST_FUNC find_mount_point(const char *name)
- {
- struct stat s;
- dev_t mountDevice;
-@@ -25,27 +25,35 @@ struct mntent* FAST_FUNC find_mount_poin
- struct mntent *mountEntry;
-
- if (stat(name, &s) != 0)
-- return 0;
-+ return NULL;
-
-- if ((s.st_mode & S_IFMT) == S_IFBLK)
-+ if (S_ISBLK(s.st_mode))
- mountDevice = s.st_rdev;
- else
- mountDevice = s.st_dev;
-
-
-- mountTable = setmntent(table ? table : bb_path_mtab_file, "r");
-+ mountTable = setmntent(bb_path_mtab_file, "r");
- if (!mountTable)
- return 0;
-
-- while ((mountEntry = getmntent(mountTable)) != 0) {
-+ while ((mountEntry = getmntent(mountTable)) != NULL) {
-+ /* rootfs mount in Linux 2.6 exists always,
-+ * and it makes sense to always ignore it.
-+ * Otherwise people can't reference their "real" root! */
-+ if (strcmp(mountEntry->mnt_fsname, "rootfs") == 0)
-+ continue;
-+
- if (strcmp(name, mountEntry->mnt_dir) == 0
- || strcmp(name, mountEntry->mnt_fsname) == 0
- ) { /* String match. */
- break;
- }
-- if (stat(mountEntry->mnt_fsname, &s) == 0 && s.st_rdev == mountDevice) /* Match the device. */
-+ /* Match the device. */
-+ if (stat(mountEntry->mnt_fsname, &s) == 0 && s.st_rdev == mountDevice)
- break;
-- if (stat(mountEntry->mnt_dir, &s) == 0 && s.st_dev == mountDevice) /* Match the directory's mount point. */
-+ /* Match the directory's mount point. */
-+ if (stat(mountEntry->mnt_dir, &s) == 0 && s.st_dev == mountDevice)
- break;
- }
- endmntent(mountTable);
-diff -urpN busybox-1.14.2/util-linux/mkfs_minix.c busybox-1.14.2-df/util-linux/mkfs_minix.c
---- busybox-1.14.2/util-linux/mkfs_minix.c 2009-07-05 22:59:30.000000000 +0200
-+++ busybox-1.14.2-df/util-linux/mkfs_minix.c 2009-07-05 23:00:09.000000000 +0200
-@@ -624,7 +624,6 @@ static void setup_tables(void)
- int mkfs_minix_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
- int mkfs_minix_main(int argc UNUSED_PARAM, char **argv)
- {
-- struct mntent *mp;
- unsigned opt;
- char *tmp;
- struct stat statbuf;
-@@ -683,11 +682,8 @@ int mkfs_minix_main(int argc UNUSED_PARA
- G.total_blocks = 65535;
-
- /* Check if it is mounted */
-- mp = find_mount_point(G.device_name, NULL);
-- if (mp && strcmp(G.device_name, mp->mnt_fsname) == 0)
-- bb_error_msg_and_die("%s is mounted on %s; "
-- "refusing to make a filesystem",
-- G.device_name, mp->mnt_dir);
-+ if (find_mount_point(G.device_name))
-+ bb_error_msg_and_die("can't format mounted filesystem");
-
- xmove_fd(xopen(G.device_name, O_RDWR), dev_fd);
- if (fstat(dev_fd, &statbuf) < 0)
-diff -urpN busybox-1.14.2/util-linux/mkfs_vfat.c busybox-1.14.2-df/util-linux/mkfs_vfat.c
---- busybox-1.14.2/util-linux/mkfs_vfat.c 2009-07-05 22:59:30.000000000 +0200
-+++ busybox-1.14.2-df/util-linux/mkfs_vfat.c 2009-07-05 23:00:35.000000000 +0200
-@@ -273,10 +273,10 @@ int mkfs_vfat_main(int argc UNUSED_PARAM
- device_num == 0x0d00 || // xd
- device_num == 0x1600 ) // hdc, hdd
- )
-- bb_error_msg_and_die("Will not try to make filesystem on full-disk device (use -I if wanted)");
-+ bb_error_msg_and_die("will not try to make filesystem on full-disk device (use -I if wanted)");
- // can't work on mounted filesystems
-- if (find_mount_point(device_name, NULL))
-- bb_error_msg_and_die("Can't format mounted filesystem");
-+ if (find_mount_point(device_name))
-+ bb_error_msg_and_die("can't format mounted filesystem");
- #endif
- // get true sector size
- // (parameter must be int*, not long* or size_t*)
|
[-]
[+]
|
Deleted |
busybox-1.14.2-ls.patch
^
|
@@ -1,152 +0,0 @@
-diff -urpN busybox-1.14.2/coreutils/ls.c busybox-1.14.2-ls/coreutils/ls.c
---- busybox-1.14.2/coreutils/ls.c 2009-06-22 00:40:29.000000000 +0200
-+++ busybox-1.14.2-ls/coreutils/ls.c 2009-07-03 12:46:16.000000000 +0200
-@@ -144,8 +144,7 @@ static const char ls_options[] ALIGN1 =
- USE_FEATURE_LS_FOLLOWLINKS("L") /* 1, 24 */
- USE_FEATURE_LS_RECURSIVE("R") /* 1, 25 */
- USE_FEATURE_HUMAN_READABLE("h") /* 1, 26 */
-- USE_SELINUX("K") /* 1, 27 */
-- USE_SELINUX("Z") /* 1, 28 */
-+ USE_SELINUX("KZ") /* 2, 28 */
- USE_FEATURE_AUTOWIDTH("T:w:") /* 2, 30 */
- ;
- enum {
-@@ -162,6 +161,16 @@ enum {
- OPT_Q = (1 << 10),
- //OPT_A = (1 << 11),
- //OPT_k = (1 << 12),
-+ OPTBIT_color = 13
-+ + 4 * ENABLE_FEATURE_LS_TIMESTAMPS
-+ + 4 * ENABLE_FEATURE_LS_SORTFILES
-+ + 2 * ENABLE_FEATURE_LS_FILETYPES
-+ + 1 * ENABLE_FEATURE_LS_FOLLOWLINKS
-+ + 1 * ENABLE_FEATURE_LS_RECURSIVE
-+ + 1 * ENABLE_FEATURE_HUMAN_READABLE
-+ + 2 * ENABLE_SELINUX
-+ + 2 * ENABLE_FEATURE_AUTOWIDTH,
-+ OPT_color = 1 << OPTBIT_color,
- };
-
- enum {
-@@ -889,16 +898,6 @@ static int list_single(const struct dnod
- }
-
-
--/* colored LS support by JaWi, janwillem.janssen@lxtreme.nl */
--#if ENABLE_FEATURE_LS_COLOR
--/* long option entry used only for --color, which has no short option
-- * equivalent */
--static const char ls_color_opt[] ALIGN1 =
-- "color\0" Optional_argument "\xff" /* no short equivalent */
-- ;
--#endif
--
--
- int ls_main(int argc UNUSED_PARAM, char **argv)
- {
- struct dnode **dnd;
-@@ -911,8 +910,25 @@ int ls_main(int argc UNUSED_PARAM, char
- int dnfiles;
- int dndirs;
- int i;
-+#if ENABLE_FEATURE_LS_COLOR
-+ /* colored LS support by JaWi, janwillem.janssen@lxtreme.nl */
-+ /* coreutils 6.10:
-+ * # ls --color=BOGUS
-+ * ls: invalid argument 'BOGUS' for '--color'
-+ * Valid arguments are:
-+ * 'always', 'yes', 'force'
-+ * 'never', 'no', 'none'
-+ * 'auto', 'tty', 'if-tty'
-+ * (and substrings: "--color=alwa" work too)
-+ */
-+ static const char ls_longopts[] ALIGN1 =
-+ "color\0" Optional_argument "\xff"; /* no short equivalent */
-+ static const char color_str[] ALIGN1 =
-+ "always\0""yes\0""force\0"
-+ "auto\0""tty\0""if-tty\0";
- /* need to initialize since --color has _an optional_ argument */
-- USE_FEATURE_LS_COLOR(const char *color_opt = "always";)
-+ const char *color_opt = color_str; /* "always" */
-+#endif
-
- INIT_G();
-
-@@ -927,7 +943,7 @@ int ls_main(int argc UNUSED_PARAM, char
- #endif
-
- /* process options */
-- USE_FEATURE_LS_COLOR(applet_long_options = ls_color_opt;)
-+ USE_FEATURE_LS_COLOR(applet_long_options = ls_longopts;)
- #if ENABLE_FEATURE_AUTOWIDTH
- opt_complementary = "T+:w+"; /* -T N, -w N */
- opt = getopt32(argv, ls_options, &tabstops, &terminal_width
-@@ -966,13 +982,20 @@ int ls_main(int argc UNUSED_PARAM, char
- if (!p || (p[0] && strcmp(p, "none") != 0))
- show_color = 1;
- }
-- if (opt & (1 << i)) { /* next flag after short options */
-- if (strcmp("always", color_opt) == 0)
-- show_color = 1;
-- else if (strcmp("never", color_opt) == 0)
-+ if (opt & OPT_color) {
-+ if (color_opt[0] == 'n')
- show_color = 0;
-- else if (strcmp("auto", color_opt) == 0 && isatty(STDOUT_FILENO))
-- show_color = 1;
-+ else switch (index_in_substrings(color_str, color_opt)) {
-+ case 3:
-+ case 4:
-+ case 5:
-+ if (isatty(STDOUT_FILENO)) {
-+ case 0:
-+ case 1:
-+ case 2:
-+ show_color = 1;
-+ }
-+ }
- }
- #endif
-
-diff -urpN busybox-1.14.2/testsuite/ls/ls-1-works busybox-1.14.2-ls/testsuite/ls/ls-1-works
---- busybox-1.14.2/testsuite/ls/ls-1-works 2009-06-22 00:32:00.000000000 +0200
-+++ busybox-1.14.2-ls/testsuite/ls/ls-1-works 2009-07-02 14:28:45.000000000 +0200
-@@ -1,4 +1,4 @@
- [ -n "$d" ] || d=..
--ls -1 "$d" > logfile.gnu
--busybox ls -1 "$d" > logfile.bb
--cmp logfile.gnu logfile.bb
-+LC_ALL=C ls -1 "$d" > logfile.gnu
-+LC_ALL=C busybox ls -1 "$d" > logfile.bb
-+diff -ubw logfile.gnu logfile.bb
-diff -urpN busybox-1.14.2/testsuite/ls/ls-h-works busybox-1.14.2-ls/testsuite/ls/ls-h-works
---- busybox-1.14.2/testsuite/ls/ls-h-works 2009-06-22 00:32:00.000000000 +0200
-+++ busybox-1.14.2-ls/testsuite/ls/ls-h-works 2009-07-02 14:28:45.000000000 +0200
-@@ -1,4 +1,4 @@
- [ -n "$d" ] || d=..
--ls -h "$d" > logfile.gnu
--busybox ls -h "$d" > logfile.bb
--cmp logfile.gnu logfile.bb
-+LC_ALL=C ls -h "$d" > logfile.gnu
-+LC_ALL=C busybox ls -h "$d" > logfile.bb
-+diff -ubw logfile.gnu logfile.bb
-diff -urpN busybox-1.14.2/testsuite/ls/ls-l-works busybox-1.14.2-ls/testsuite/ls/ls-l-works
---- busybox-1.14.2/testsuite/ls/ls-l-works 2009-06-22 00:32:00.000000000 +0200
-+++ busybox-1.14.2-ls/testsuite/ls/ls-l-works 2009-07-02 14:28:45.000000000 +0200
-@@ -1,4 +1,4 @@
- [ -n "$d" ] || d=..
- LC_ALL=C ls -l "$d" > logfile.gnu
--busybox ls -l "$d" > logfile.bb
--diff -w logfile.gnu logfile.bb
-+LC_ALL=C busybox ls -l "$d" > logfile.bb
-+diff -ubw logfile.gnu logfile.bb
-diff -urpN busybox-1.14.2/testsuite/ls/ls-s-works busybox-1.14.2-ls/testsuite/ls/ls-s-works
---- busybox-1.14.2/testsuite/ls/ls-s-works 2009-06-22 00:32:00.000000000 +0200
-+++ busybox-1.14.2-ls/testsuite/ls/ls-s-works 2009-07-02 14:28:45.000000000 +0200
-@@ -1,4 +1,4 @@
- [ -n "$d" ] || d=..
- LC_ALL=C ls -1s "$d" > logfile.gnu
--busybox ls -1s "$d" > logfile.bb
--cmp logfile.gnu logfile.bb
-+LC_ALL=C busybox ls -1s "$d" > logfile.bb
-+diff -ubw logfile.gnu logfile.bb
|
[-]
[+]
|
Deleted |
busybox-1.14.2-ping6.patch
^
|
@@ -1,12 +0,0 @@
-diff -urpN busybox-1.14.2/include/applets.h busybox-1.14.2-ping6/include/applets.h
---- busybox-1.14.2/include/applets.h 2009-06-22 00:40:29.000000000 +0200
-+++ busybox-1.14.2-ping6/include/applets.h 2009-07-30 12:50:02.972397194 +0200
-@@ -284,7 +284,7 @@ USE_PATCH(APPLET(patch, _BB_DIR_USR_BIN,
- USE_PGREP(APPLET(pgrep, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
- USE_PIDOF(APPLET(pidof, _BB_DIR_BIN, _BB_SUID_NEVER))
- USE_PING(APPLET(ping, _BB_DIR_BIN, _BB_SUID_MAYBE))
--USE_PING6(APPLET(ping6, _BB_DIR_BIN, _BB_SUID_NEVER))
-+USE_PING6(APPLET(ping6, _BB_DIR_BIN, _BB_SUID_MAYBE))
- USE_PIPE_PROGRESS(APPLET(pipe_progress, _BB_DIR_BIN, _BB_SUID_NEVER))
- USE_PIVOT_ROOT(APPLET(pivot_root, _BB_DIR_SBIN, _BB_SUID_NEVER))
- USE_PKILL(APPLET_ODDNAME(pkill, pgrep, _BB_DIR_USR_BIN, _BB_SUID_NEVER, pkill))
|
[-]
[+]
|
Deleted |
busybox-1.14.2-test.patch
^
|
@@ -1,64 +0,0 @@
-diff -urpN busybox-1.14.2/coreutils/test.c busybox-1.14.2-test/coreutils/test.c
---- busybox-1.14.2/coreutils/test.c 2009-07-05 22:59:28.000000000 +0200
-+++ busybox-1.14.2-test/coreutils/test.c 2009-07-17 01:46:28.000000000 +0200
-@@ -571,7 +571,14 @@ static number_t nexpr(enum token n)
-
- nest_msg(">nexpr(%s)\n", TOKSTR[n]);
- if (n == UNOT) {
-- res = !nexpr(check_operator(*++args));
-+ n = check_operator(*++args);
-+ if (n == EOI) {
-+ /* special case: [ ! ], [ a -a ! ] are valid */
-+ /* IOW, "! ARG" may miss ARG */
-+ unnest_msg("<nexpr:1 (!EOI)\n");
-+ return 1;
-+ }
-+ res = !nexpr(n);
- unnest_msg("<nexpr:%lld\n", res);
- return res;
- }
-@@ -742,7 +749,7 @@ int test_main(int argc, char **argv)
- check_operator(argv[1]);
- if (last_operator->op_type == BINOP) {
- /* "test [!] arg1 <binary_op> arg2" */
-- args = &argv[0];
-+ args = argv;
- res = (binop() == 0);
- goto ret;
- }
-@@ -755,7 +762,7 @@ int test_main(int argc, char **argv)
- argv--;
- }
- #endif
-- args = &argv[0];
-+ args = argv;
- res = !oexpr(check_operator(*args));
-
- if (*args != NULL && *++args != NULL) {
-diff -urpN busybox-1.14.2/testsuite/test.tests busybox-1.14.2-test/testsuite/test.tests
---- busybox-1.14.2/testsuite/test.tests 2009-07-05 22:59:22.000000000 +0200
-+++ busybox-1.14.2-test/testsuite/test.tests 2009-07-17 01:46:28.000000000 +0200
-@@ -21,6 +21,11 @@ testing "test '': should be false (1)" \
- "1\n" \
- "" ""
-
-+testing "test !: should be true (0)" \
-+ "busybox test !; echo \$?" \
-+ "0\n" \
-+ "" ""
-+
- testing "test a: should be true (0)" \
- "busybox test a; echo \$?" \
- "0\n" \
-@@ -51,6 +56,11 @@ testing "test -lt = -gt: should be false
- "1\n" \
- "" ""
-
-+testing "test a -a !: should be true (0)" \
-+ "busybox test a -a !; echo \$?" \
-+ "0\n" \
-+ "" ""
-+
- testing "test -f = a -o b: should be true (0)" \
- "busybox test -f = a -o b; echo \$?" \
- "0\n" \
|
[-]
[+]
|
Deleted |
busybox-1.14.2-udhcp-services.patch
^
|
@@ -1,24 +0,0 @@
---- 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
|
[-]
[+]
|
Deleted |
busybox-1.14.2-udhcpd.patch
^
|
@@ -1,12 +0,0 @@
-diff -urpN busybox-1.14.2/networking/udhcp/files.c busybox-1.14.2-udhcpd/networking/udhcp/files.c
---- busybox-1.14.2/networking/udhcp/files.c 2009-06-22 00:40:29.000000000 +0200
-+++ busybox-1.14.2-udhcpd/networking/udhcp/files.c 2009-07-07 14:58:39.000000000 +0200
-@@ -420,7 +420,7 @@ void FAST_FUNC read_leases(const char *f
- continue;
- /* NB: add_lease takes "relative time", IOW,
- * lease duration, not lease deadline. */
-- if (!(add_lease(lease.chaddr, lease.yiaddr, expires, lease.hostname))) {
-+ if (!(add_lease(lease.chaddr, lease.yiaddr, expires, NULL /* was lease.hostname. bug in add_lease, disabled */ ))) {
- bb_error_msg("too many leases while loading %s", file);
- break;
- }
|
[-]
[+]
|
Deleted |
busybox-1.15.2-ash.patch
^
|
@@ -1,1136 +0,0 @@
-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 /* "}~" */
|
[-]
[+]
|
Deleted |
busybox-1.15.2-awk.patch
^
|
@@ -1,48 +0,0 @@
-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
|
[-]
[+]
|
Deleted |
busybox-1.15.2-buildsys.patch
^
|
@@ -1,92 +0,0 @@
-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:
|
[-]
[+]
|
Deleted |
busybox-1.15.2-flash.patch
^
|
@@ -1,84 +0,0 @@
-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)
|
[-]
[+]
|
Deleted |
busybox-1.15.2-grep.patch
^
|
@@ -1,25 +0,0 @@
-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
|
[-]
[+]
|
Deleted |
busybox-1.15.2-ping.patch
^
|
@@ -1,100 +0,0 @@
-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
-
|
[-]
[+]
|
Deleted |
busybox-1.15.2-split.patch
^
|
@@ -1,18 +0,0 @@
-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;
- }
|
[-]
[+]
|
Deleted |
busybox-1.15.2-udhcp-services.patch
^
|
@@ -1,24 +0,0 @@
---- 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.16.0-POLLHUP.patch
^
|
@@ -0,0 +1,93 @@
+diff -urpN busybox-1.16.0/miscutils/microcom.c busybox-1.16.0-POLLHUP/miscutils/microcom.c
+--- busybox-1.16.0/miscutils/microcom.c 2010-01-25 01:59:38.000000000 +0100
++++ busybox-1.16.0-POLLHUP/miscutils/microcom.c 2010-03-02 23:53:28.000000000 +0100
+@@ -119,7 +119,7 @@ int microcom_main(int argc UNUSED_PARAM,
+ nfd = 2;
+ // Not safe_poll: we want to exit on signal
+ while (!bb_got_signal && poll(pfd, nfd, timeout) > 0) {
+- if (nfd > 1 && (pfd[1].revents & POLLIN)) {
++ if (nfd > 1 && pfd[1].revents) {
+ char c;
+ // read from stdin -> write to device
+ if (safe_read(STDIN_FILENO, &c, 1) < 1) {
+@@ -143,7 +143,7 @@ int microcom_main(int argc UNUSED_PARAM,
+ safe_poll(pfd, 1, delay);
+ skip_write: ;
+ }
+- if (pfd[0].revents & POLLIN) {
++ if (pfd[0].revents) {
+ #define iobuf bb_common_bufsiz1
+ ssize_t len;
+ // read from device -> write to stdout
+diff -urpN busybox-1.16.0/networking/httpd.c busybox-1.16.0-POLLHUP/networking/httpd.c
+--- busybox-1.16.0/networking/httpd.c 2010-01-25 01:59:38.000000000 +0100
++++ busybox-1.16.0-POLLHUP/networking/httpd.c 2010-03-02 23:53:28.000000000 +0100
+@@ -1167,7 +1167,7 @@ static NOINLINE void cgi_io_loop_and_exi
+ break;
+ }
+
+- if (pfd[TO_CGI].revents & POLLOUT) {
++ if (pfd[TO_CGI].revents) {
+ /* hdr_cnt > 0 here due to the way pfd[TO_CGI].events set */
+ /* Have data from peer and can write to CGI */
+ count = safe_write(toCgi_wr, hdr_ptr, hdr_cnt);
+@@ -1184,7 +1184,7 @@ static NOINLINE void cgi_io_loop_and_exi
+ }
+ }
+
+- if (pfd[0].revents & POLLIN) {
++ if (pfd[0].revents) {
+ /* post_len > 0 && hdr_cnt == 0 here */
+ /* We expect data, prev data portion is eaten by CGI
+ * and there *is* data to read from the peer
+@@ -1202,7 +1202,7 @@ static NOINLINE void cgi_io_loop_and_exi
+ }
+ }
+
+- if (pfd[FROM_CGI].revents & POLLIN) {
++ if (pfd[FROM_CGI].revents) {
+ /* There is something to read from CGI */
+ char *rbuf = iobuf;
+
+diff -urpN busybox-1.16.0/networking/telnet.c busybox-1.16.0-POLLHUP/networking/telnet.c
+--- busybox-1.16.0/networking/telnet.c 2010-01-25 01:59:38.000000000 +0100
++++ busybox-1.16.0-POLLHUP/networking/telnet.c 2010-03-02 23:53:28.000000000 +0100
+@@ -618,7 +618,7 @@ int telnet_main(int argc UNUSED_PARAM, c
+ default:
+
+ #ifdef USE_POLL
+- if (ufds[0].revents & POLLIN)
++ if (ufds[0].revents)
+ #else
+ if (FD_ISSET(STDIN_FILENO, &rfds))
+ #endif
+@@ -631,7 +631,7 @@ int telnet_main(int argc UNUSED_PARAM, c
+ }
+
+ #ifdef USE_POLL
+- if (ufds[1].revents & POLLIN)
++ if (ufds[1].revents)
+ #else
+ if (FD_ISSET(netfd, &rfds))
+ #endif
+diff -urpN busybox-1.16.0/util-linux/script.c busybox-1.16.0-POLLHUP/util-linux/script.c
+--- busybox-1.16.0/util-linux/script.c 2010-01-25 01:59:39.000000000 +0100
++++ busybox-1.16.0-POLLHUP/util-linux/script.c 2010-03-02 23:53:28.000000000 +0100
+@@ -119,7 +119,7 @@ int script_main(int argc UNUSED_PARAM, c
+ * for example, try "script -c true" */
+ break;
+ }
+- if (pfd[0].revents & POLLIN) {
++ if (pfd[0].revents) {
+ errno = 0;
+ count = safe_read(pty, buf, sizeof(buf));
+ if (count <= 0 && errno != EAGAIN) {
+@@ -143,7 +143,7 @@ int script_main(int argc UNUSED_PARAM, c
+ }
+ }
+ }
+- if (pfd[1].revents & POLLIN) {
++ if (pfd[1].revents) {
+ count = safe_read(STDIN_FILENO, buf, sizeof(buf));
+ if (count <= 0) {
+ /* err/eof from stdin: don't read stdin anymore */
|
[-]
[+]
|
Added |
busybox-1.16.0-beep.patch
^
|
@@ -0,0 +1,17 @@
+diff -urpN busybox-1.16.0/miscutils/beep.c busybox-1.16.0-beep/miscutils/beep.c
+--- busybox-1.16.0/miscutils/beep.c 2010-01-25 01:59:38.000000000 +0100
++++ busybox-1.16.0-beep/miscutils/beep.c 2010-03-14 15:27:24.000000000 +0100
+@@ -79,11 +79,11 @@ int beep_main(int argc, char **argv)
+ }
+ while (rep) {
+ //bb_info_msg("rep[%d] freq=%d, length=%d, delay=%d", rep, freq, length, delay);
+- xioctl(speaker, KIOCSOUND, (void*)(long)tickrate_div_freq);
++ xioctl(speaker, KIOCSOUND, (void*)(uintptr_t)tickrate_div_freq);
+ usleep(1000 * length);
+ ioctl(speaker, KIOCSOUND, (void*)0);
+ if (--rep)
+- usleep(delay);
++ usleep(1000 * delay);
+ }
+ }
+
|
[-]
[+]
|
Added |
busybox-1.16.0-dhcpd.patch
^
|
@@ -0,0 +1,12 @@
+diff -urpN busybox-1.16.0/networking/udhcp/dhcpd.c busybox-1.16.0-dhcpd/networking/udhcp/dhcpd.c
+--- busybox-1.16.0/networking/udhcp/dhcpd.c 2010-01-25 01:59:38.000000000 +0100
++++ busybox-1.16.0-dhcpd/networking/udhcp/dhcpd.c 2010-03-27 20:07:58.000000000 +0100
+@@ -61,7 +61,7 @@ int udhcpd_main(int argc UNUSED_PARAM, c
+ logmode |= LOGMODE_SYSLOG;
+ }
+ #if ENABLE_FEATURE_UDHCP_PORT
+- if (opt & 4) { /* -P */
++ if (opt & 8) { /* -P */
+ SERVER_PORT = xatou16(str_P);
+ CLIENT_PORT = SERVER_PORT + 1;
+ }
|
[-]
[+]
|
Added |
busybox-1.16.0-fbsplash.patch
^
|
@@ -0,0 +1,142 @@
+diff -urpN busybox-1.16.0/miscutils/fbsplash.c busybox-1.16.0-fbsplash/miscutils/fbsplash.c
+--- busybox-1.16.0/miscutils/fbsplash.c 2010-01-25 01:59:38.000000000 +0100
++++ busybox-1.16.0-fbsplash/miscutils/fbsplash.c 2010-03-14 23:59:21.000000000 +0100
+@@ -84,7 +84,7 @@ static void fb_open(const char *strfb_de
+ // map the device in memory
+ G.addr = mmap(NULL,
+ G.scr_var.xres * G.scr_var.yres
+- * BYTES_PER_PIXEL /*(G.scr_var.bits_per_pixel / 8)*/ ,
++ * BYTES_PER_PIXEL /*(G.scr_var.bits_per_pixel / 8)*/,
+ PROT_WRITE, MAP_SHARED, fbfd, 0);
+ if (G.addr == MAP_FAILED)
+ bb_perror_msg_and_die("mmap");
+@@ -121,7 +121,7 @@ static void fb_drawrectangle(void)
+ // vertical lines
+ ptr1 = (DATA*)(G.addr + (G.nbar_posy * G.scr_var.xres + G.nbar_posx) * BYTES_PER_PIXEL);
+ ptr2 = (DATA*)(G.addr + (G.nbar_posy * G.scr_var.xres + G.nbar_posx + G.nbar_width - 1) * BYTES_PER_PIXEL);
+- cnt = G.nbar_height - 1 /* HUH?! G.nbar_posy + G.nbar_height - 1 - G.nbar_posy*/;
++ cnt = G.nbar_height - 1;
+ do {
+ *ptr1 = thispix; ptr1 += G.scr_var.xres;
+ *ptr2 = thispix; ptr2 += G.scr_var.xres;
+@@ -216,70 +216,69 @@ static void fb_drawprogressbar(unsigned
+ */
+ static void fb_drawimage(void)
+ {
+- char *head, *ptr;
+ FILE *theme_file;
++ char *read_ptr;
+ unsigned char *pixline;
+ unsigned i, j, width, height, line_size;
+
+- if (LONE_DASH(G.image_filename))
++ if (LONE_DASH(G.image_filename)) {
+ theme_file = stdin;
+- else {
++ } else {
+ int fd = open_zipped(G.image_filename);
+ if (fd < 0)
+ bb_simple_perror_msg_and_die(G.image_filename);
+ theme_file = xfdopen_for_read(fd);
+ }
+- head = xmalloc(256);
+
+- /* parse ppm header
+- * - A ppm image’s magic number is the two characters "P6".
++ /* Parse ppm header:
++ * - Magic: two characters "P6".
+ * - Whitespace (blanks, TABs, CRs, LFs).
+ * - A width, formatted as ASCII characters in decimal.
+ * - Whitespace.
+- * - A height, again in ASCII decimal.
++ * - A height, ASCII decimal.
+ * - Whitespace.
+- * - The maximum color value (Maxval), again in ASCII decimal. Must be
+- * less than 65536.
++ * - The maximum color value, ASCII decimal, in 0..65535
+ * - Newline or other single whitespace character.
++ * (we support newline only)
+ * - A raster of Width * Height pixels in triplets of rgb
+- * in pure binary by 1 (or not implemented 2) bytes.
++ * in pure binary by 1 or 2 bytes. (we support only 1 byte)
+ */
++#define concat_buf bb_common_bufsiz1
++ read_ptr = concat_buf;
+ while (1) {
+- if (fgets(head, 256, theme_file) == NULL
+- /* do not overrun the buffer */
+- || strlen(bb_common_bufsiz1) >= sizeof(bb_common_bufsiz1) - 256)
++ int w, h, max_color_val;
++ int rem = concat_buf + sizeof(concat_buf) - read_ptr;
++ if (rem < 2
++ || fgets(read_ptr, rem, theme_file) == NULL
++ ) {
+ bb_error_msg_and_die("bad PPM file '%s'", G.image_filename);
+-
+- ptr = memchr(skip_whitespace(head), '#', 256);
+- if (ptr != NULL)
+- *ptr = 0; /* ignore comments */
+- strcat(bb_common_bufsiz1, head);
+- // width, height, max_color_val
+- if (sscanf(bb_common_bufsiz1, "P6 %u %u %u", &width, &height, &i) == 3
+- && i <= 255)
++ }
++ read_ptr = strchrnul(read_ptr, '#');
++ *read_ptr = '\0'; /* ignore #comments */
++ if (sscanf(concat_buf, "P6 %u %u %u", &w, &h, &max_color_val) == 3
++ && max_color_val <= 255
++ ) {
++ width = w; /* w is on stack, width may be in register */
++ height = h;
+ break;
+- /* If we do not find a signature throughout the whole file then
+- we will diagnose this via EOF on read in the head of the loop. */
++ }
+ }
+
+- if (ENABLE_FEATURE_CLEAN_UP)
+- free(head);
+- if (width != G.scr_var.xres || height != G.scr_var.yres)
+- bb_error_msg_and_die("PPM %dx%d does not match screen %dx%d",
+- width, height, G.scr_var.xres, G.scr_var.yres);
+ line_size = width*3;
++ pixline = xmalloc(line_size);
++
+ if (width > G.scr_var.xres)
+ width = G.scr_var.xres;
+ if (height > G.scr_var.yres)
+ height = G.scr_var.yres;
+-
+- pixline = xmalloc(line_size);
+ for (j = 0; j < height; j++) {
+- unsigned char *pixel = pixline;
+- DATA *src = (DATA *)(G.addr + j * G.scr_fix.line_length);
++ unsigned char *pixel;
++ DATA *src;
+
+ if (fread(pixline, 1, line_size, theme_file) != line_size)
+ bb_error_msg_and_die("bad PPM file '%s'", G.image_filename);
++ pixel = pixline;
++ src = (DATA *)(G.addr + j * G.scr_fix.line_length);
+ for (i = 0; i < width; i++) {
+ unsigned thispix;
+ thispix = (((unsigned)pixel[0] << 8) & 0xf800)
+@@ -289,8 +288,7 @@ static void fb_drawimage(void)
+ pixel += 3;
+ }
+ }
+- if (ENABLE_FEATURE_CLEAN_UP)
+- free(pixline);
++ free(pixline);
+ fclose(theme_file);
+ }
+
+@@ -312,7 +310,7 @@ static void init(const char *cfg_filenam
+ char *token[2];
+ parser_t *parser = config_open2(cfg_filename, xfopen_stdin);
+ while (config_read(parser, token, 2, 2, "#=",
+- (PARSE_NORMAL | PARSE_MIN_DIE) & ~(PARSE_TRIM | PARSE_COLLAPSE))) {
++ (PARSE_NORMAL | PARSE_MIN_DIE) & ~(PARSE_TRIM | PARSE_COLLAPSE))) {
+ unsigned val = xatoi_u(token[1]);
+ int i = index_in_strings(param_names, token[0]);
+ if (i < 0)
|
[-]
[+]
|
Added |
busybox-1.16.0-hush.patch
^
|
@@ -0,0 +1,14 @@
+diff -urpN busybox-1.16.0/shell/hush.c busybox-1.16.0-hush/shell/hush.c
+--- busybox-1.16.0/shell/hush.c 2010-01-25 17:51:24.000000000 +0100
++++ busybox-1.16.0-hush/shell/hush.c 2010-03-22 01:46:39.000000000 +0100
+@@ -3568,7 +3568,9 @@ static void execvp_or_die(char **argv)
+ {
+ debug_printf_exec("execing '%s'\n", argv[0]);
+ sigprocmask(SIG_SETMASK, &G.inherited_set, NULL);
+- execvp(argv[0], argv);
++ /* if FEATURE_SH_STANDALONE, "exec <applet_name>" should work,
++ * therefore we should use BB_EXECVP, not execvp */
++ BB_EXECVP(argv[0], argv);
+ bb_perror_msg("can't execute '%s'", argv[0]);
+ _exit(127); /* bash compat */
+ }
|
[-]
[+]
|
Added |
busybox-1.16.0-standalone_single.patch
^
|
@@ -0,0 +1,78 @@
+diff -urpN busybox-1.16.0/applets/applet_tables.c busybox-1.16.0-standalone_single/applets/applet_tables.c
+--- busybox-1.16.0/applets/applet_tables.c 2010-01-25 01:59:38.000000000 +0100
++++ busybox-1.16.0-standalone_single/applets/applet_tables.c 2010-03-21 19:44:06.000000000 +0100
+@@ -79,6 +79,7 @@ int main(int argc, char **argv)
+ }
+ printf("\n");
+
++ printf("#ifndef SKIP_definitions\n");
+ printf("const char applet_names[] ALIGN1 = \"\"\n");
+ for (i = 0; i < NUM_APPLETS; i++) {
+ printf("\"%s\" \"\\0\"\n", applets[i].name);
+@@ -120,9 +121,10 @@ int main(int argc, char **argv)
+ printf("0x%02x,\n", v);
+ i++;
+ }
+- printf("};\n\n");
++ printf("};\n");
+ #endif
+-
++ printf("#endif /* SKIP_definitions */\n");
++ printf("\n");
+ printf("#define MAX_APPLET_NAME_LEN %u\n", MAX_APPLET_NAME_LEN);
+
+ return 0;
+diff -urpN busybox-1.16.0/shell/ash.c busybox-1.16.0-standalone_single/shell/ash.c
+--- busybox-1.16.0/shell/ash.c 2010-01-25 01:59:38.000000000 +0100
++++ busybox-1.16.0-standalone_single/shell/ash.c 2010-03-21 19:44:06.000000000 +0100
+@@ -43,8 +43,6 @@
+ #endif
+
+ #include "busybox.h" /* for applet_names */
+-//TODO: pull in some .h and find out do we have SINGLE_APPLET_MAIN?
+-//#include "applet_tables.h" doesn't work
+ #include <paths.h>
+ #include <setjmp.h>
+ #include <fnmatch.h>
+@@ -58,12 +56,15 @@
+ # define CLEAR_RANDOM_T(rnd) ((void)0)
+ #endif
+
+-#if defined SINGLE_APPLET_MAIN
++#define SKIP_definitions 1
++#include "applet_tables.h"
++#undef SKIP_definitions
++#if NUM_APPLETS == 1
+ /* STANDALONE does not make sense, and won't compile */
+ # undef CONFIG_FEATURE_SH_STANDALONE
+ # undef ENABLE_FEATURE_SH_STANDALONE
+ # undef IF_FEATURE_SH_STANDALONE
+-# undef IF_NOT_FEATURE_SH_STANDALONE(...)
++# undef IF_NOT_FEATURE_SH_STANDALONE
+ # define ENABLE_FEATURE_SH_STANDALONE 0
+ # define IF_FEATURE_SH_STANDALONE(...)
+ # define IF_NOT_FEATURE_SH_STANDALONE(...) __VA_ARGS__
+diff -urpN busybox-1.16.0/shell/hush.c busybox-1.16.0-standalone_single/shell/hush.c
+--- busybox-1.16.0/shell/hush.c 2010-01-25 17:51:24.000000000 +0100
++++ busybox-1.16.0-standalone_single/shell/hush.c 2010-03-21 19:44:06.000000000 +0100
+@@ -125,14 +125,18 @@
+ # define USE_FOR_MMU(...)
+ #endif
+
+-#if defined SINGLE_APPLET_MAIN
++#define SKIP_definitions 1
++#include "applet_tables.h"
++#undef SKIP_definitions
++#if NUM_APPLETS == 1
+ /* STANDALONE does not make sense, and won't compile */
+ # undef CONFIG_FEATURE_SH_STANDALONE
+ # undef ENABLE_FEATURE_SH_STANDALONE
+ # undef IF_FEATURE_SH_STANDALONE
++# undef IF_NOT_FEATURE_SH_STANDALONE
++# define ENABLE_FEATURE_SH_STANDALONE 0
+ # define IF_FEATURE_SH_STANDALONE(...)
+ # define IF_NOT_FEATURE_SH_STANDALONE(...) __VA_ARGS__
+-# define ENABLE_FEATURE_SH_STANDALONE 0
+ #endif
+
+ #if !ENABLE_HUSH_INTERACTIVE
|
[-]
[+]
|
Added |
busybox-1.16.0-tail.patch
^
|
@@ -0,0 +1,13 @@
+diff -urpN busybox-1.16.0/coreutils/tail.c busybox-1.16.0-tail/coreutils/tail.c
+--- busybox-1.16.0/coreutils/tail.c 2010-03-08 22:49:32.000000000 +0100
++++ busybox-1.16.0-tail/coreutils/tail.c 2010-03-12 22:16:07.105943986 +0100
+@@ -241,7 +241,8 @@ int tail_main(int argc, char **argv)
+ } while (nwrite);
+ }
+ }
+- xwrite(STDOUT_FILENO, buf + nread - nwrite, nwrite);
++ if (nwrite > 0)
++ xwrite(STDOUT_FILENO, buf + nread - nwrite, nwrite);
+ } else if (count) {
+ if (COUNT_BYTES) {
+ taillen += nread;
|
[-]
[+]
|
Added |
busybox-1.16.0-touch.patch
^
|
@@ -0,0 +1,21 @@
+diff -urpN busybox-1.16.0/coreutils/touch.c busybox-1.16.0-touch/coreutils/touch.c
+--- busybox-1.16.0/coreutils/touch.c 2010-01-25 01:59:38.000000000 +0100
++++ busybox-1.16.0-touch/coreutils/touch.c 2010-03-21 13:05:34.000000000 +0100
+@@ -104,7 +104,7 @@ int touch_main(int argc UNUSED_PARAM, ch
+ }
+
+ do {
+- if (utimes(*argv, reference_file ? timebuf : NULL) != 0) {
++ if (utimes(*argv, (reference_file || date_str) ? timebuf : NULL) != 0) {
+ if (errno == ENOENT) { /* no such file */
+ if (opts) { /* creation is disabled, so ignore */
+ continue;
+@@ -113,7 +113,7 @@ int touch_main(int argc UNUSED_PARAM, ch
+ fd = open(*argv, O_RDWR | O_CREAT, 0666);
+ if (fd >= 0) {
+ xclose(fd);
+- if (reference_file)
++ if (reference_file || date_str)
+ utimes(*argv, timebuf);
+ continue;
+ }
|
[-]
[+]
|
Added |
busybox-1.16.0-wc.patch
^
|
@@ -0,0 +1,12 @@
+diff -urpN busybox-1.16.0/coreutils/wc.c busybox-1.16.0-wc/coreutils/wc.c
+--- busybox-1.16.0/coreutils/wc.c 2010-03-08 22:49:32.000000000 +0100
++++ busybox-1.16.0-wc/coreutils/wc.c 2010-03-08 22:51:29.310086707 +0100
+@@ -88,6 +88,8 @@ int wc_main(int argc UNUSED_PARAM, char
+ if (!argv[0]) {
+ *--argv = (char *) bb_msg_standard_input;
+ fname_fmt = "\n";
++ }
++ if (!argv[1]) { /* zero or one filename? */
+ if (!((print_type-1) & print_type)) /* exactly one option? */
+ start_fmt = "%"COUNT_FMT;
+ }
|
|
Deleted |
busybox-1.11.0.tar.bz2
^
|
|
Deleted |
busybox-1.12.0.tar.bz2
^
|
|
Deleted |
busybox-1.14.2.tar.bz2
^
|
|
Deleted |
busybox-1.15.2.tar.bz2
^
|