From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1BVvki-0007bg-Rx for qemu-devel@nongnu.org; Thu, 03 Jun 2004 13:11:40 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1BVvkh-0007bT-8o for qemu-devel@nongnu.org; Thu, 03 Jun 2004 13:11:40 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BVvkh-0007bQ-18 for qemu-devel@nongnu.org; Thu, 03 Jun 2004 13:11:39 -0400 Received: from [213.146.130.142] (helo=trantor.org.uk) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1BVvkH-0000As-Px for qemu-devel@nongnu.org; Thu, 03 Jun 2004 13:11:14 -0400 Subject: Re: [Qemu-devel] Re: qemu port From: Gianni Tedesco In-Reply-To: <40BE68D3.5030006@fabianowski.de> References: <40B90DB2.3040508@fabianowski.de> <1085872155.93476.18.camel@pcgem.rdg.cyberkinetica.com> <20040530102509.0f234b19.markus.niemisto@gmx.net> <1085910613.94556.3.camel@pcgem.rdg.cyberkinetica.com> <40B9F2A3.5000707@fabianowski.de> <1085938065.347.1.camel@pcgem.rdg.cyberkinetica.com> <40BA2EA1.7020104@fabianowski.de> <1085947772.347.5.camel@pcgem.rdg.cyberkinetica.com> <40BA7E1A.5080005@fabianowski.de> <1085966664.347.8.camel@pcgem.rdg.cyberkinetica.com> <20040603011805.A40432@saturn.kn-bremen.de> <40BE68D3.5030006@fabianowski.de> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-9ihOAVn/YSQxZPO54Wca" Date: Thu, 03 Jun 2004 18:10:17 +0100 Message-Id: <1086282617.21903.123.camel@sherbert> Mime-Version: 1.0 Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org --=-9ihOAVn/YSQxZPO54Wca Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Thu, 2004-06-03 at 01:54 +0200, Bartosz Fabianowski wrote: > I haven't tried compiling or running this, but my idea would be to try > something like this instead: > if((size =3D lseek(fd, 0LL, SEEK_END)) < 0) > size =3D 0; This is the preferred method in Linux now aswell (over and above BLKGETSIZE(64) ioctls). --=20 // Gianni Tedesco (gianni at scaramanga dot co dot uk) lynx --source www.scaramanga.co.uk/scaramanga.asc | gpg --import 8646BE7D: 6D9F 2287 870E A2C9 8F60 3A3C 91B5 7669 8646 BE7D --=-9ihOAVn/YSQxZPO54Wca Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQBAv1t5kbV2aYZGvn0RAiChAJ9MLjfZfjA0qTdwf1pPs0VtX60ZewCeKosG 6aNpG4X2+SyUe0srbjxfXwg= =d9bG -----END PGP SIGNATURE----- --=-9ihOAVn/YSQxZPO54Wca--