From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:34271) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T8XZO-0006kD-JD for qemu-devel@nongnu.org; Mon, 03 Sep 2012 10:24:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T8XZK-0007Wx-0c for qemu-devel@nongnu.org; Mon, 03 Sep 2012 10:24:06 -0400 Received: from cantor2.suse.de ([195.135.220.15]:55661 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T8XZJ-0007Wl-MO for qemu-devel@nongnu.org; Mon, 03 Sep 2012 10:24:01 -0400 Message-ID: <5044BD7D.3000706@suse.de> Date: Mon, 03 Sep 2012 16:23:57 +0200 From: =?ISO-8859-15?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <1346658419-13829-1-git-send-email-brad@fnarfbargle.com> In-Reply-To: <1346658419-13829-1-git-send-email-brad@fnarfbargle.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [RESEND] [PATCH] Properly use backing file argument to git-img convert List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Brad Campbell Cc: kwolf@redhat.com, qemu-devel@nongnu.org Am 03.09.2012 09:46, schrieb Brad Campbell: > Converting to an image with an output backing file would write out the= contents > of the source image whether or not it was already contained in the new= backing > file. This commit ensures that the source file is checked against the = new > backing file and output is only allocated if it obsoletes or extends d= ata > already in the supplied backing file. >=20 >=20 > Signed-off-by: Brad Campbell For a resend it would've been nice to get the typos out, I'm sure you mean qemu-img. :) And it would be nice to have that marked as the topic then so that it's easily recognized ("qemu-img: Bla bla"). > --- > qemu-img.c | 74 ++++++++++++++++++++++++++++++++++++++++++++++------= ------- > 1 files changed, 57 insertions(+), 17 deletions(-) >=20 > diff --git a/qemu-img.c b/qemu-img.c > index c8a70ff..3fb6cbf 100644 > --- a/qemu-img.c > +++ b/qemu-img.c > @@ -629,11 +629,12 @@ static int img_convert(int argc, char **argv) > int progress =3D 0, flags; > const char *fmt, *out_fmt, *cache, *out_baseimg, *out_filename; > BlockDriver *drv, *proto_drv; > - BlockDriverState **bs =3D NULL, *out_bs =3D NULL; > + BlockDriverState **bs =3D NULL, *out_bs =3D NULL, *out_bf =3D NULL= ; > int64_t total_sectors, nb_sectors, sector_num, bs_offset; > - uint64_t bs_sectors; > + uint64_t bf_sectors, bs_sectors; > uint8_t * buf =3D NULL; > const uint8_t *buf1; > + uint8_t * bf_buf =3D NULL; Should be *bf_buf despite the * buf line above (checkpatch.pl sometimes mixes up multiplication and declaration of pointer variables). > BlockDriverInfo bdi; > QEMUOptionParameter *param =3D NULL, *create_options =3D NULL; > QEMUOptionParameter *out_baseimg_param; [snip] Note that the merge window for v1.3 is not yet open so you'll have to be a bit patient before seeing your patch in qemu.git. http://wiki.qemu.org/Planning/1.2 Regards, Andreas --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrnbe= rg