From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1OBOPo-0003tW-3q for qemu-devel@nongnu.org; Mon, 10 May 2010 04:32:40 -0400 Received: from [140.186.70.92] (port=52038 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OBOOg-00022q-2V for qemu-devel@nongnu.org; Mon, 10 May 2010 04:32:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OBOMy-0006wj-GY for qemu-devel@nongnu.org; Mon, 10 May 2010 04:31:28 -0400 Received: from mx1.redhat.com ([209.132.183.28]:26908) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OBOMx-0006wQ-CK for qemu-devel@nongnu.org; Mon, 10 May 2010 04:29:44 -0400 Date: Mon, 10 May 2010 11:29:39 +0300 From: Gleb Natapov Message-ID: <20100510082939.GL24787@redhat.com> References: <20100510081118.GI24787@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: Subject: [Qemu-devel] Re: [PATCHv2] Support for booting from virtio disks List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: seabios@seabios.org, qemu-devel@nongnu.org, kvm@vger.kernel.org On Mon, May 10, 2010 at 09:25:20AM +0100, Stefan Hajnoczi wrote: > > diff --git a/src/virtio-blk.c b/src/virtio-blk.c > > new file mode 100644 > > index 0000000..a41c336 > > --- /dev/null > > +++ b/src/virtio-blk.c > > @@ -0,0 +1,155 @@ > > +// Virtio blovl boot support. >=20 > Just noticed the "blovl" typo. >=20 > > + =9A =9A =9A =9Achar *desc =3D malloc_tmphigh(MAXDESCSIZE); > > + =9A =9A =9A =9Astruct virtiodrive_s *vdrive_g =3D malloc_fseg(sizeof(= *vdrive_g)); > > + =9A =9A =9A =9Astruct vring_virtqueue *vq =3D malloc_low(sizeof(*vq)); > > + =9A =9A =9A =9Aif (!vdrive_g || !desc || !vq) { > > + =9A =9A =9A =9A =9A =9Awarn_noalloc(); > > + =9A =9A =9A =9A =9A =9Areturn; > > + =9A =9A =9A =9A} >=20 > This error return can still leak. >=20 Oh Gosh, programming is hard. Why don't we write bios in python? -- Gleb.