summaryrefslogtreecommitdiff
path: root/coreutils/tail.c
diff options
context:
space:
mode:
authorDenys Vlasenko2011-10-28 17:48:15 +0200
committerDenys Vlasenko2011-10-28 17:48:15 +0200
commit1e98f3741c5a844c1d3d7966f20cd09dded05d0d (patch)
tree6044a3e180389e63c55173f5018bf2ddaa195cd6 /coreutils/tail.c
parented058016bf8fc98271de2e58bfb650de9e9d304d (diff)
downloadbusybox-1e98f3741c5a844c1d3d7966f20cd09dded05d0d.zip
busybox-1e98f3741c5a844c1d3d7966f20cd09dded05d0d.tar.gz
Apply post-1.19.2 patches, bump version to 1.19.31_19_3
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'coreutils/tail.c')
-rw-r--r--coreutils/tail.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/coreutils/tail.c b/coreutils/tail.c
index 454c259..43cecbd 100644
--- a/coreutils/tail.c
+++ b/coreutils/tail.c
@@ -203,7 +203,7 @@ int tail_main(int argc, char **argv)
int fd = fds[i];
if (ENABLE_FEATURE_FANCY_TAIL && fd < 0)
- continue; /* may happen with -E */
+ continue; /* may happen with -F */
if (nfiles > header_threshhold) {
tail_xprint_header(fmt, argv[i]);
@@ -252,14 +252,14 @@ int tail_main(int argc, char **argv)
* Used only by +N code ("start from Nth", 1-based): */
seen = 1;
newlines_seen = 0;
- while ((nread = tail_read(fd, buf, tailbufsize-taillen)) > 0) {
+ while ((nread = tail_read(fd, buf, tailbufsize - taillen)) > 0) {
if (G.from_top) {
int nwrite = nread;
if (seen < count) {
/* We need to skip a few more bytes/lines */
if (COUNT_BYTES) {
nwrite -= (count - seen);
- seen = count;
+ seen += nread;
} else {
char *s = buf;
do {