aboutsummaryrefslogtreecommitdiff
path: root/tail.c
diff options
context:
space:
mode:
authorandersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277>2001-06-26 15:07:08 +0000
committerandersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277>2001-06-26 15:07:08 +0000
commita5ea39b402ebdc39621ce44fdbe6bd0d06a3f5b1 (patch)
treeab2ca26ce88380246cb7fe9d7f423c85643d6ec3 /tail.c
parent098f9284606716ba803204c23341bab293e0ff92 (diff)
downloadbusybox-w32-a5ea39b402ebdc39621ce44fdbe6bd0d06a3f5b1.tar.gz
busybox-w32-a5ea39b402ebdc39621ce44fdbe6bd0d06a3f5b1.tar.bz2
busybox-w32-a5ea39b402ebdc39621ce44fdbe6bd0d06a3f5b1.zip
A patch from Erik Meusel <erik@wh58-709.st.uni-magdeburg.de>
to fix the behavior of 'tail -f -n 0 FILE' git-svn-id: svn://busybox.net/trunk/busybox@2909 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'tail.c')
-rw-r--r--tail.c4
1 files changed, 4 insertions, 0 deletions
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]);