Re: lseek SEEK_END fails on a Toshiba 6007MB disk.

From: Andreas Dilger (adilger@turbolabs.com)
Date: Wed Feb 20 2002 - 19:23:12 EST


On Feb 20, 2002 15:40 -0800, Kallol Biswas wrote:
> offset = lseek(fd, 0, SEEK_END);
>
> lseek: Value too large for defined data type

You need to use a 64-bit lseek (e.g. llseek or lseek64). This can
be done with '#define _LARGEFILE_SOURCE' and/or '#define _LARGEFILE64_SOURCE'
and/or '#define _FILE_OFFSET_BITS=64'.

Cheers, Andreas

--
Andreas Dilger
http://sourceforge.net/projects/ext2resize/
http://www-mddsp.enel.ucalgary.ca/People/adilger/

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Feb 23 2002 - 21:00:28 EST