From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53107) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WDkCJ-000291-BW for qemu-devel@nongnu.org; Wed, 12 Feb 2014 19:30:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WDkCE-0004y3-M6 for qemu-devel@nongnu.org; Wed, 12 Feb 2014 19:30:35 -0500 Received: from mx1.redhat.com ([209.132.183.28]:40037) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WDkCE-0004x3-1N for qemu-devel@nongnu.org; Wed, 12 Feb 2014 19:30:30 -0500 Message-ID: <52FC1213.9050405@redhat.com> Date: Wed, 12 Feb 2014 17:30:11 -0700 From: Eric Blake MIME-Version: 1.0 References: <1392186806-10418-1-git-send-email-cyliu@suse.com> <1392186806-10418-12-git-send-email-cyliu@suse.com> In-Reply-To: <1392186806-10418-12-git-send-email-cyliu@suse.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="SFSoaLm1i7CASsq052Kf2oUEox8Jik301" Subject: Re: [Qemu-devel] [PATCH v20 11/26] qcow2.c: replace QEMUOptionParameter with QemuOpts in create List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Chunyan Liu , qemu-devel@nongnu.org Cc: kwolf@redhat.com, Dong Xu Wang , stefanha@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --SFSoaLm1i7CASsq052Kf2oUEox8Jik301 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 02/11/2014 11:33 PM, Chunyan Liu wrote: > qcow2.c: replace QEMUOptionParameter with QemuOpts in 'qemu-img create'= =2E >=20 > Signed-off-by: Dong Xu Wang > Signed-off-by: Chunyan Liu > --- > block/qcow2.c | 176 ++++++++++++++++++++++++++++---------------------= ------- > 1 files changed, 88 insertions(+), 88 deletions(-) >=20 > + buf =3D NULL; > + buf =3D qemu_opt_get_del(opts, BLOCK_OPT_COMPAT_LEVEL); Dead assignment to NULL. > + if (!buf || !strcmp(buf, "0.10")) { > + version =3D 2; > + } else if (!strcmp(buf, "1.1")) { > + version =3D 3; > + } else { > + fprintf(stderr, "Invalid compatibility level: '%s'\n", > + buf); Indentation looks off. > @@ -1682,7 +1676,7 @@ static int qcow2_create(const char *filename, QEM= UOptionParameter *options, > } > =20 > ret =3D qcow2_create2(filename, sectors, backing_file, backing_fmt= , flags, > - cluster_size, prealloc, options, version, &loc= al_err); > + cluster_size, prealloc, opts, version, &local_= err); > if (error_is_set(&local_err)) { > error_propagate(errp, local_err); Might conflict with other cleanups that is turning 'if (error_is_set(&local_err))' into 'if (local_err)' --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --SFSoaLm1i7CASsq052Kf2oUEox8Jik301 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJS/BITAAoJEKeha0olJ0NqnLcH/0hrHz/vSwB9XnatB/xh9zBR bEWDp1LBNuP1WRd6HFs6Nlg5BPA+EIypvchc/8X+fY9OlQwqpWRmv9jofXgh5E8q kD4NVV6Jq0VF7+qzlbll5Np+J0sYnynF7nSyHLeEKxXtIT/DzSl5XouohU4Js5ZR xerXdUYQtzm4f2Q/0TXY1YKPpK6bns+zT4YVNBG906kZlMLYiIiLgDkV0E1Lnha2 zAtldjYHWpvS7rfnWZJ7ezKoZAGJ5JXqfs73FlxWQDOq08+NaGnYsFDcqReLnZp4 VvNnGskFm9xfAWI3NWAapLEjC+9jxdlfvlB3Tj0Lkev/M0SzmDj1Xsp1iW/6k14= =HO59 -----END PGP SIGNATURE----- --SFSoaLm1i7CASsq052Kf2oUEox8Jik301--