diff options
author | ache <ache@FreeBSD.org> | 2001-03-27 01:16:44 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 2001-03-27 01:16:44 +0000 |
commit | 8a3f432b98157ea7f5538df68cbef661ec45e342 (patch) | |
tree | 4d85989d58d27247350eda464542b15f5b29634b /usr.bin/tail | |
parent | f14a467f59999d2b67afa9aea5d875bcab1bb6c7 (diff) | |
download | FreeBSD-src-8a3f432b98157ea7f5538df68cbef661ec45e342.zip FreeBSD-src-8a3f432b98157ea7f5538df68cbef661ec45e342.tar.gz |
Use SSIZE_MAX instead of INT_MAX, as kernel does ssize_t check
Better explanation comment of FIXME section
Diffstat (limited to 'usr.bin/tail')
-rw-r--r-- | usr.bin/tail/forward.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/tail/forward.c b/usr.bin/tail/forward.c index 023f941..cfcb535 100644 --- a/usr.bin/tail/forward.c +++ b/usr.bin/tail/forward.c @@ -281,7 +281,9 @@ rlines(fp, off, sbp) } /* XXX: FIXME - mmap() not support files over 2Gb */ - if (size > INT_MAX) { + /* Large file processing require alternative implementation */ + /* for now print nice error diagnostic at least */ + if (size > SSIZE_MAX) { errno = EFBIG; ierr(); exit(1); |