diff options
author | Andrey A. Chernov <ache@FreeBSD.org> | 2001-03-27 01:16:44 +0000 |
---|---|---|
committer | Andrey A. Chernov <ache@FreeBSD.org> | 2001-03-27 01:16:44 +0000 |
commit | 1410c7cc9a9a74ba772690a6b19021781e6b440c (patch) | |
tree | 6b0ee83d9401d8afd28bcadd61bc65aae2f5da44 /usr.bin/tail | |
parent | 0c1a06170bc7f00471d6c5c045830e62c00d8c64 (diff) | |
download | src-1410c7cc9a9a74ba772690a6b19021781e6b440c.tar.gz src-1410c7cc9a9a74ba772690a6b19021781e6b440c.zip |
Use SSIZE_MAX instead of INT_MAX, as kernel does ssize_t check
Better explanation comment of FIXME section
Notes
Notes:
svn path=/head/; revision=74834
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 023f941d81fe..cfcb535acc3a 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); |