Micah Cowan <address@hidden> writes:
> it seems that
> write() /is/ in fact required to return EFBIG in this case. I'll go bug
> the kernel guys, then. :)
Thanks. That is a much better solution. That is what Solaris does,
for example:
$ echo foo | dd bs=1 of=/var/tmp/t seek=1099511627774
dd: writing `/var/tmp/t': File too large
2+0 records in
1+0 records out
1 byte (1 B) copied, 0.0197642 s, 0.1 kB/s
$ ls -l /var/tmp/t
-rw-rw-r-- 1 eggert faculty 1099511627775 2007-04-10 09:23 /var/tmp/t
This is on a file system where file sizes must be less than 1 TiB.