summaryrefslogtreecommitdiff
path: root/inotail.c
diff options
context:
space:
mode:
authorSage Weil <sage@newdream.net>2009-04-21 16:48:09 -0700
committerTobias Klauser <tklauser@sym.(none)>2009-04-23 09:29:22 +0200
commit7b2b04536464157d31a34aab6968608a7849c0ab (patch)
tree31da5a3a080ce108a2945f8e9c3e2a2af12a3d31 /inotail.c
parent1ed419bfccdac6018edf9dc3c79d4d9e06b3b529 (diff)
inotail: open with O_LARGEFILE
Opening with O_LARGEFILE avoids failing with -EFBIG on large (>2gb?) files on 32bit machines (tested on 32bit x86).
Diffstat (limited to 'inotail.c')
-rw-r--r--inotail.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/inotail.c b/inotail.c
index dca2605..735c4b7 100644
--- a/inotail.c
+++ b/inotail.c
@@ -548,7 +548,7 @@ static int tail_file(struct file_struct *f, unsigned long n_units, char mode)
if (strcmp(f->name, "-") == 0)
f->fd = STDIN_FILENO;
else {
- f->fd = open(f->name, O_RDONLY);
+ f->fd = open(f->name, O_RDONLY|O_LARGEFILE);
if (unlikely(f->fd < 0)) {
fprintf(stderr, "Error: Could not open file '%s' (%s)\n", f->name, strerror(errno));
return -1;