diff options
Diffstat (limited to 'login-utils')
-rw-r--r-- | login-utils/utmpdump.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/login-utils/utmpdump.c b/login-utils/utmpdump.c index f1a3607dc..defa230b9 100644 --- a/login-utils/utmpdump.c +++ b/login-utils/utmpdump.c @@ -169,6 +169,9 @@ static int follow_by_inotify(FILE *in, const char *filename, FILE *out) size = ftello(in); fclose(in); + if (size < 0) + err(EXIT_FAILURE, _("%s: cannot get file position"), filename); + wd = inotify_add_watch(fd, filename, EVENTS); if (wd == -1) err(EXIT_FAILURE, _("%s: cannot add inotify watch."), filename); |