From 18679d10a134533164a8b3ef18daa68831f16aec Mon Sep 17 00:00:00 2001 From: Peter Korsgaard Date: Tue, 25 Mar 2008 14:38:45 +0000 Subject: busybox: add 1.10.0 release --- package/busybox/busybox-1.10.0-tail.patch | 62 +++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 package/busybox/busybox-1.10.0-tail.patch (limited to 'package/busybox/busybox-1.10.0-tail.patch') diff --git a/package/busybox/busybox-1.10.0-tail.patch b/package/busybox/busybox-1.10.0-tail.patch new file mode 100644 index 000000000..990cdc308 --- /dev/null +++ b/package/busybox/busybox-1.10.0-tail.patch @@ -0,0 +1,62 @@ +--- busybox-1.10.0/coreutils/tail.c Thu Mar 20 12:46:51 2008 ++++ busybox-1.10.0-tail/coreutils/tail.c Sun Mar 23 04:25:12 2008 +@@ -163,8 +163,6 @@ + fmt = header_fmt + 1; /* Skip header leading newline on first output. */ + i = 0; + do { +- off_t current; +- + if (nfiles > header_threshhold) { + tail_xprint_header(fmt, argv[i]); + fmt = header_fmt; +@@ -173,19 +171,17 @@ + /* Optimizing count-bytes case if the file is seekable. + * Beware of backing up too far. + * Also we exclude files with size 0 (because of /proc/xxx) */ +- current = lseek(fds[i], 0, SEEK_END); +- if (current > 0) { +- if (!from_top) { ++ if (COUNT_BYTES && !from_top) { ++ off_t current = lseek(fds[i], 0, SEEK_END); ++ if (current > 0) { + if (count == 0) + continue; /* showing zero lines is easy :) */ +- if (COUNT_BYTES) { +- current -= count; +- if (current < 0) +- current = 0; +- xlseek(fds[i], current, SEEK_SET); +- bb_copyfd_size(fds[i], STDOUT_FILENO, count); +- continue; +- } ++ current -= count; ++ if (current < 0) ++ current = 0; ++ xlseek(fds[i], current, SEEK_SET); ++ bb_copyfd_size(fds[i], STDOUT_FILENO, count); ++ continue; + } + } + +--- busybox-1.10.0/testsuite/tail/tail-n-works Thu Mar 20 12:46:57 2008 ++++ busybox-1.10.0-tail/testsuite/tail/tail-n-works Sun Mar 23 04:25:12 2008 +@@ -1,4 +1,4 @@ +-[ -n "$d" ] || d=.. +-tail -n 2 "$d/README" > logfile.gnu +-busybox tail -n 2 "$d/README" > logfile.bb +-cmp logfile.gnu logfile.bb ++echo -ne "abc\ndef\n123\n" >input ++echo -ne "def\n123\n" >logfile.ok ++busybox tail -n 2 input > logfile.bb ++cmp logfile.ok logfile.bb +--- busybox-1.10.0/testsuite/tail/tail-works Thu Mar 20 12:46:57 2008 ++++ busybox-1.10.0-tail/testsuite/tail/tail-works Sun Mar 23 04:25:12 2008 +@@ -1,4 +1,4 @@ +-[ -n "$d" ] || d=.. +-tail -n 2 "$d/README" > logfile.gnu +-busybox tail -n 2 "$d/README" > logfile.bb +-cmp logfile.gnu logfile.bb ++echo -ne "abc\ndef\n123\n" >input ++echo -ne "def\n123\n" >logfile.ok ++busybox tail -2 input > logfile.bb ++cmp logfile.ok logfile.bb -- cgit v1.2.3