From 7b2b04536464157d31a34aab6968608a7849c0ab Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 21 Apr 2009 16:48:09 -0700 Subject: inotail: open with O_LARGEFILE Opening with O_LARGEFILE avoids failing with -EFBIG on large (>2gb?) files on 32bit machines (tested on 32bit x86). --- inotail.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'inotail.c') 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; -- cgit v1.2.3-54-g00ecf