From owner-freebsd-questions@FreeBSD.ORG Tue Jan 6 09:50:13 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B65B216A4CE for ; Tue, 6 Jan 2004 09:50:13 -0800 (PST) Received: from falcon.midgard.homeip.net (h201n1fls24o1048.bredband.comhem.se [212.181.162.201]) by mx1.FreeBSD.org (Postfix) with SMTP id F3E6243D6B for ; Tue, 6 Jan 2004 09:50:00 -0800 (PST) (envelope-from ertr1013@student.uu.se) Received: (qmail 36486 invoked by uid 1001); 6 Jan 2004 17:49:58 -0000 Date: Tue, 6 Jan 2004 18:49:58 +0100 From: Erik Trulsson To: Alex Message-ID: <20040106174958.GA36407@falcon.midgard.homeip.net> Mail-Followup-To: Alex , freebsd-questions@freebsd.org References: <3FFAF127.3080309@dynaweb.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3FFAF127.3080309@dynaweb.ru> User-Agent: Mutt/1.5.5.1i cc: freebsd-questions@freebsd.org Subject: Re: how to use lseek() system call with over 2G files? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2004 17:50:13 -0000 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. -- Erik Trulsson ertr1013@student.uu.se