From 3bed59438fa05d30d41f7720c509676be016fe8f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Wed, 19 Nov 2008 12:03:12 +0000 Subject: [PATCH] - up for 1.12.2 Changed files: busybox-ash_exec.patch -> 1.3 busybox-inotify.patch -> 1.1 busybox-loadfont.patch -> 1.5 busybox-printf-gettext.patch -> 1.10 --- busybox-ash_exec.patch | 16 ++++++++-------- busybox-inotify.patch | 11 +++++++++++ busybox-loadfont.patch | 16 ++++++++-------- busybox-printf-gettext.patch | 34 +++++++++++++++++----------------- 4 files changed, 44 insertions(+), 33 deletions(-) create mode 100644 busybox-inotify.patch diff --git a/busybox-ash_exec.patch b/busybox-ash_exec.patch index c2b87b7..594c3a5 100644 --- a/busybox-ash_exec.patch +++ b/busybox-ash_exec.patch @@ -1,11 +1,11 @@ ---- busybox-1.00-pre2/shell/ash.c~ 2003-08-24 12:47:36.000000000 +0200 -+++ busybox-1.00-pre2/shell/ash.c 2003-08-24 12:47:43.000000000 +0200 -@@ -6600,7 +6600,7 @@ - #endif - if (repeated++) { +--- busybox-1.12.2/shell/ash.c~ 2008-11-19 12:28:54.508026186 +0100 ++++ busybox-1.12.2/shell/ash.c 2008-11-19 12:29:38.578022328 +0100 +@@ -6988,7 +6988,7 @@ free(argv); -- } else if (errno == ENOEXEC) { -+ } else if (errno == ENOEXEC || errno == ENOENT) { + return; + } +- if (errno == ENOEXEC) { ++ if (errno == ENOEXEC || errno == ENOENT) { char **ap; char **new; - + diff --git a/busybox-inotify.patch b/busybox-inotify.patch new file mode 100644 index 0000000..b49082b --- /dev/null +++ b/busybox-inotify.patch @@ -0,0 +1,11 @@ +--- busybox-1.12.2/miscutils/inotifyd.c.org 2008-11-19 12:52:28.714759776 +0100 ++++ busybox-1.12.2/miscutils/inotifyd.c 2008-11-19 12:52:49.514757748 +0100 +@@ -28,6 +28,8 @@ + */ + + #include "libbb.h" ++#define HAVE_ARCH_STRUCT_FLOCK ++#define HAVE_ARCH_STRUCT_FLOCK64 + #include + + static volatile smallint signalled; diff --git a/busybox-loadfont.patch b/busybox-loadfont.patch index 5164e3c..666d7a4 100644 --- a/busybox-loadfont.patch +++ b/busybox-loadfont.patch @@ -1,13 +1,13 @@ ---- busybox-1.3.1/console-tools/loadfont.c.orig 2006-12-27 05:54:01.000000000 +0100 -+++ busybox-1.3.1/console-tools/loadfont.c 2006-12-30 12:29:56.698666552 +0100 -@@ -169,8 +169,10 @@ +--- busybox-1.12.2/console-tools/loadfont.c~ 2008-11-19 12:27:34.314700966 +0100 ++++ busybox-1.12.2/console-tools/loadfont.c 2008-11-19 12:28:35.598028789 +0100 +@@ -115,8 +115,10 @@ head0 = sizeof(struct psf_header); head = head0 + fontsize * unit; + /* - if (head > inputlth || (!hastable && head != inputlth)) + if (head > len || (!hastable && head != len)) bb_error_msg_and_die("input file: bad length"); -+ */ - do_loadfont(fd, inbuf + head0, unit, fontsize); - if (hastable) - do_loadtable(fd, inbuf + head, inputlth - head, fontsize); ++ */ + } else { + /* file with three code pages? */ + if (len == 9780) { diff --git a/busybox-printf-gettext.patch b/busybox-printf-gettext.patch index 0ecab6d..a566ff8 100644 --- a/busybox-printf-gettext.patch +++ b/busybox-printf-gettext.patch @@ -1,6 +1,5 @@ -diff -urN busybox-1.6.0.org/coreutils/printf.c busybox-1.6.0/coreutils/printf.c ---- busybox-1.6.0.org/coreutils/printf.c 2007-06-01 13:48:34.000000000 +0200 -+++ busybox-1.6.0/coreutils/printf.c 2007-06-03 20:27:45.511646939 +0200 +--- busybox-1.12.2/coreutils/printf.c 2008-09-28 20:04:18.000000000 +0200 ++++ busybox-1.12.2.patch/coreutils/printf.c 2008-11-19 13:00:54.187842550 +0100 @@ -38,6 +38,9 @@ // 19990508 Busy Boxed! Dave Cinege @@ -10,9 +9,9 @@ diff -urN busybox-1.6.0.org/coreutils/printf.c busybox-1.6.0/coreutils/printf.c + #include "libbb.h" - typedef void (*converter)(const char *arg, void *result); -@@ -285,19 +288,137 @@ - return save_argc - argc; + /* A note on bad input: neither bash 3.2 nor coreutils 6.10 stop on it. +@@ -334,10 +337,131 @@ + return argv; } +/* @@ -122,12 +121,11 @@ diff -urN busybox-1.6.0.org/coreutils/printf.c busybox-1.6.0/coreutils/printf.c +# define getmsg(a,b) (b) +#endif + - int printf_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; - int printf_main(int argc, char **argv) + int printf_main(int argc UNUSED_PARAM, char **argv) { char *format; -- int args_used; -+ int args_used, opt; + char **argv2; ++ int opt; + const char *nls_file = NULL; + + while ((opt = getopt(argc, argv, "n:")) != -1) @@ -139,17 +137,19 @@ diff -urN busybox-1.6.0.org/coreutils/printf.c busybox-1.6.0/coreutils/printf.c + bb_show_usage(); + break; + } ++ + format = getmsg(nls_file, argv[optind++]); - if (argc <= 1 || argv[1][0] == '-') { + /* We must check that stdout is not closed. + * The reason for this is highly non-obvious. +@@ -362,8 +486,8 @@ + if (!argv[1]) bb_show_usage(); - } - format = argv[1]; -- argc -= 2; -- argv += 2; -+ argc -= optind; -+ argv += optind; +- argv2 = argv + 2; ++ argv += optind; ++ argv2 = argv; do { - args_used = print_formatted(format, argc, argv); + argv = argv2; -- 2.44.0