From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1J0f9Y-0002zH-JQ for qemu-devel@nongnu.org; Fri, 07 Dec 2007 10:30:12 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1J0f9W-0002yg-3H for qemu-devel@nongnu.org; Fri, 07 Dec 2007 10:30:12 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J0f9V-0002yd-Ux for qemu-devel@nongnu.org; Fri, 07 Dec 2007 10:30:09 -0500 Received: from ecfrec.frec.bull.fr ([129.183.4.8]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1J0f9V-0002OZ-7E for qemu-devel@nongnu.org; Fri, 07 Dec 2007 10:30:09 -0500 Subject: Re: [Qemu-devel] [PATCH 2/2] Real SCSI device passthrough (v3) From: Laurent Vivier In-Reply-To: <200712071522.54416.paul@codesourcery.com> References: <11970374183207@bull.net> <200712071522.54416.paul@codesourcery.com> Date: Fri, 07 Dec 2007 16:29:59 +0100 Message-Id: <1197041399.4521.2.camel@frecb07144> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-CnNjOlkRBCAedab53x58" Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paul Brook Cc: qemu-devel@nongnu.org --=-CnNjOlkRBCAedab53x58 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Le vendredi 07 d=C3=A9cembre 2007 =C3=A0 15:22 +0000, Paul Brook a =C3=A9cr= it : > On Friday 07 December 2007, Laurent Vivier wrote: > > - acb->aiocb.aio_nbytes =3D nb_sectors * 512; > > + if (nb_sectors < 0) > > + acb->aiocb.aio_nbytes =3D -nb_sectors; > > + else > > + acb->aiocb.aio_nbytes =3D nb_sectors * 512; >=20 > Ugly hacks like this need at least a decent comment. Yes, you're right but I'm always wondering if it is the good way to do what I want: read a number of bytes instead of a number of sectors. Perhaps I should define a new function in the qemu AIO interface ? There is another ugly hack, did you find it ? ;-) Laurent --=20 ------------- Laurent.Vivier@bull.net -------------- "Any sufficiently advanced technology is indistinguishable from magic." - Arthur C. Clarke --=-CnNjOlkRBCAedab53x58 Content-Type: application/pgp-signature; name=signature.asc Content-Description: Ceci est une partie de message =?ISO-8859-1?Q?num=E9riquement?= =?ISO-8859-1?Q?_sign=E9e?= -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQBHWWb39Kffa9pFVzwRAmbFAKC96kf3+XTiZ9RLizlmIMkwouBtjACgmxZO QxC7xQ/dUyu6vcXrHJQez1A= =Df5I -----END PGP SIGNATURE----- --=-CnNjOlkRBCAedab53x58--