Re: stat(2) off by one

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Emil,

On Thu, Nov 25, 2010 at 1:58 AM, Emil Mikulic <emikulic@xxxxxxxxx> wrote:
> As seen on http://www.kernel.org/doc/man-pages/online/pages/man2/stat.2.html:
>
>       EOVERFLOW
>              (stat()) path refers to a file whose size cannot be
> represented in the
>              type off_t.  This can occur when an application compiled
> on a 32-bit
>              platform without -D_FILE_OFFSET_BITS=64 calls stat() on
> a file whose
>              size exceeds (2<<31)-1 bits.
>
> I believe 2<<31 should read 1<<31 (which equals 2^31).
>
> I've tested this on an Ubuntu 10.04 system and the largest file I can
> successfully stat [without the #define] is 2147483647 bytes.

Thanks for the report. You are of course right, and I made the change
you suggest for man-[ages-3.32.

Thanks,

Michael




-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Author of "The Linux Programming Interface"; http://man7.org/tlpi/
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux