summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2006-09-03 17:44:02 +0200
committerTobias Klauser <tklauser@xenon.tklauser.home>2006-09-03 17:44:02 +0200
commitf43feddebbcfe819879786328e1768793c6842b7 (patch)
treeb20a089f1a61bbf4b402a855b6d1c1f255c99b41
parent6323755c60ee7173158279d8a442c1cad96263d0 (diff)
Set mode explicitely when -n command line is specified
This prevents us from doing the wrong thing in such (very unlikely) cases: $ inotail -c 6 -n 6 file.txt
-rw-r--r--inotail.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/inotail.c b/inotail.c
index cba84c6..fc9fb7e 100644
--- a/inotail.c
+++ b/inotail.c
@@ -320,6 +320,7 @@ int main(int argc, char **argv)
forever = 1;
break;
case 'n':
+ mode = M_LINES;
n_lines = strtoul(argv[++opt], NULL, 0);
if (n_lines < 0)
n_lines = 0;