From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54087) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VoJGy-0005s5-6E for qemu-devel@nongnu.org; Wed, 04 Dec 2013 15:42:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VoJGt-0006QX-8H for qemu-devel@nongnu.org; Wed, 04 Dec 2013 15:42:16 -0500 Received: from mx1.redhat.com ([209.132.183.28]:40022) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VoJGs-0006QI-V9 for qemu-devel@nongnu.org; Wed, 04 Dec 2013 15:42:11 -0500 Message-ID: <529F939F.8020709@redhat.com> Date: Wed, 04 Dec 2013 13:42:07 -0700 From: Eric Blake MIME-Version: 1.0 References: <1386148259-10962-1-git-send-email-xiawenc@linux.vnet.ibm.com> <1386148259-10962-5-git-send-email-xiawenc@linux.vnet.ibm.com> In-Reply-To: <1386148259-10962-5-git-send-email-xiawenc@linux.vnet.ibm.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="7OimU2RPOF8MkO0aIAnbDtNLRkpOK73ol" Subject: Re: [Qemu-devel] [PATCH V7 4/6] qemu-img: add -l for snapshot in convert List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Wenchao Xia , qemu-devel@nongnu.org Cc: kwolf@redhat.com, pbonzini@redhat.com, jcody@redhat.com, stefanha@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --7OimU2RPOF8MkO0aIAnbDtNLRkpOK73ol Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 12/04/2013 02:10 AM, Wenchao Xia wrote: > Now qemu-img convert have similar options as qemu-nbd for internal > snapshot. >=20 > Signed-off-by: Wenchao Xia > --- > @@ -1183,6 +1189,18 @@ static int img_convert(int argc, char **argv) > case 's': > snapshot_name =3D optarg; > break; > + case 'l': > + if (strstart(optarg, SNAPSHOT_OPT_BASE, NULL)) { > + sn_opts =3D qemu_opts_parse(&internal_snapshot_opts, o= ptarg, 0); > + if (!sn_opts) { > + error_report("Failed in parsing snapshot param '%s= '", > + optarg); > + return 1; > + } > + } else { > + snapshot_name =3D optarg; > + } > + break; Do we want a followup patch that makes it an error to use -l and -s together? Without such a patch, we have the odd behavior that: convert -l name1 -s name2 loads name2, but: convert -l snapshot.name=3Dname1 -s name2 loads name1. Confusing that the choice of HOW the argument to -l is specified determines whether the -s has any impact. For that matter, why can't '-s' and '-l' be made synonyms of each other? In other words, why not support: convert -s snapshot.name=3Dname1 --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --7OimU2RPOF8MkO0aIAnbDtNLRkpOK73ol 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.4.15 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJSn5OgAAoJEKeha0olJ0NqMDIH/Ayd/k7bxgI9CSA8tmiLXO08 ZyJb+B591xDn10Ns/3b40reRWDgp3X+2q+KU17OcAnMmhotB6VLWTRwjcJXbXkdK x45rVcIkwZRhXssXXNvQWOjPKvzwYp1zDi4R1km9hcSM3tiyj+EGCM3Cyx/5TQKp obfOBqZ59mlzL0yp2kjmmjg4lkNx7fZ6CaPlCksVjQVqaK7t/jTN8+VRYp5GH3WL UB0FV2iKJB+wkuuuCKX/7cwGsxJ+lZcw7MXegq3dAqpZXVPewDRwT6BcsJDanggN Q5ZI98mIq9txw1yb6gjhiNkYutaqQR4tN0K1EOg8pseoCbb4EG4TcduDr1JjKAY= =W6d8 -----END PGP SIGNATURE----- --7OimU2RPOF8MkO0aIAnbDtNLRkpOK73ol--