From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:51726) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S7tZH-0008Vl-Bh for qemu-devel@nongnu.org; Wed, 14 Mar 2012 15:09:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S7tYs-0003ql-OP for qemu-devel@nongnu.org; Wed, 14 Mar 2012 15:09:02 -0400 Received: from mx1.redhat.com ([209.132.183.28]:14463) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S7tYs-0003qa-G8 for qemu-devel@nongnu.org; Wed, 14 Mar 2012 15:08:38 -0400 Message-ID: <4F60ECB4.6050006@redhat.com> Date: Wed, 14 Mar 2012 13:08:36 -0600 From: Eric Blake MIME-Version: 1.0 References: <1331751444-30905-1-git-send-email-sw@weilnetz.de> In-Reply-To: <1331751444-30905-1-git-send-email-sw@weilnetz.de> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enigD521BFF0BF4377B8D9289242" Subject: Re: [Qemu-devel] [PATCH 1/2] qemu-iotests: Fix call syntax for qemu-img List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Weil Cc: Kevin Wolf , qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigD521BFF0BF4377B8D9289242 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 03/14/2012 12:57 PM, Stefan Weil wrote: > qemu-img requires first options, then file name, then size. >=20 > GNU getopt also allows options at the end, but POSIX getopt > doesn't. Try "export POSIXLY_CORRECT=3Dy" to get the POSIX > behaviour with GNU getopt, too. That's a heavy sledgehammer, that has the potential to affect a lot of other programs called alongside qemu-img. Simpler would be to just pass -- in the command line at the point where you want to force qemu to treat all further arguments without getopt reordering them, as in: > # XXX(hch): have global image options? > - $QEMU_IMG create -f $IMGFMT $TEST_IMG $extra_img_options | \ > + $QEMU_IMG create -f $IMGFMT $extra_img_options $TEST_IMG $image_si= ze | \ $QEMU_IMG -- create -f $IMGFMT $extra_img_options $TEST_IMG $image_size --=20 Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --------------enigD521BFF0BF4377B8D9289242 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.12 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBCAAGBQJPYOy0AAoJEKeha0olJ0NqBFEH/Aw2Lk196YXuuPklsE96wQb4 hmvLjFK5sGqyxaTyxUJ3hdYiB+Nk0Whyx09Xy9tWcGF5hTbjAHV7j+hAcn8wvFDG FiXQi4eDl38g2zvMkQLNMLjUSNNq1hBX87MXqON9PecGYmT67gyJPSThfc2TBkZ7 c+ydlIdwlfJTclSfBr1O1vJNxB78seqkauV1Cs9x4qWKaeVQLFVDYEXVPATmSftr +d3/3CBFGi0viJYTEYqoaCRRdK4YCtzMV69ndvt8FpjFznXzOMqukqtA1RmKmz5Q XVIVvI8MH4LTk6wRwnwu59y0uFolLruiDwf3RVfy6wna8MdCXtt2L2xycjkmwQc= =BLHr -----END PGP SIGNATURE----- --------------enigD521BFF0BF4377B8D9289242--