aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--coreutils/tail.c4
-rw-r--r--tail.c4
2 files changed, 8 insertions, 0 deletions
diff --git a/coreutils/tail.c b/coreutils/tail.c
index 4fe92ba5e..90cc2a6ef 100644
--- a/coreutils/tail.c
+++ b/coreutils/tail.c
@@ -127,6 +127,10 @@ int tail_main(int argc, char **argv)
127 for (i = 0; i < nfiles; i++) { 127 for (i = 0; i < nfiles; i++) {
128 if (fds[i] == -1) 128 if (fds[i] == -1)
129 continue; 129 continue;
130 if (!count) {
131 lseek(fds[i], 0, SEEK_END);
132 continue;
133 }
130 seen = 0; 134 seen = 0;
131 if (show_headers || (!hide_headers && nfiles > 1)) 135 if (show_headers || (!hide_headers && nfiles > 1))
132 printf("%s==> %s <==\n", i == 0 ? "" : "\n", argv[optind + i]); 136 printf("%s==> %s <==\n", i == 0 ? "" : "\n", argv[optind + i]);
diff --git a/tail.c b/tail.c
index 4fe92ba5e..90cc2a6ef 100644
--- a/tail.c
+++ b/tail.c
@@ -127,6 +127,10 @@ int tail_main(int argc, char **argv)
127 for (i = 0; i < nfiles; i++) { 127 for (i = 0; i < nfiles; i++) {
128 if (fds[i] == -1) 128 if (fds[i] == -1)
129 continue; 129 continue;
130 if (!count) {
131 lseek(fds[i], 0, SEEK_END);
132 continue;
133 }
130 seen = 0; 134 seen = 0;
131 if (show_headers || (!hide_headers && nfiles > 1)) 135 if (show_headers || (!hide_headers && nfiles > 1))
132 printf("%s==> %s <==\n", i == 0 ? "" : "\n", argv[optind + i]); 136 printf("%s==> %s <==\n", i == 0 ? "" : "\n", argv[optind + i]);