Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 6 Jan 2004 18:49:58 +0100
From:      Erik Trulsson <ertr1013@student.uu.se>
To:        Alex <alex@dynaweb.ru>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: how to use lseek() system call with over 2G files?
Message-ID:  <20040106174958.GA36407@falcon.midgard.homeip.net>
In-Reply-To: <3FFAF127.3080309@dynaweb.ru>
References:  <3FFAF127.3080309@dynaweb.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Jan 06, 2004 at 08:32:23PM +0300, Alex wrote:
> Hi everybody!
> 
> Some time ago there wasn't any possibility to create disk file larger 
> than 2G and there was no problem with lseek().
> But as for now we can do it but I looked into headers and found off_t is 
> equal to long -> no more than 2G on i386 machines.
> As far as lseek() is a system call I cannot believe it cannot be used 
> with larger files but how?
> 
> Maybe it's a silly question? :0)

Not a silly question, but one based on false assumptions.

FreeBSD has been able to create files larger than 2G for a long time.
off_t is a 64-bit type, and therefore is quite capable of representing
sizes larger than 2G.  lseek() has no problem handling files larger than
2G.


-- 
<Insert your favourite quote here.>
Erik Trulsson
ertr1013@student.uu.se



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040106174958.GA36407>