From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:38474) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S7v7x-0002Ep-7j for qemu-devel@nongnu.org; Wed, 14 Mar 2012 16:48:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S7v7v-0001qc-Fd for qemu-devel@nongnu.org; Wed, 14 Mar 2012 16:48:56 -0400 Received: from v220110690675601.yourvserver.net ([78.47.199.172]:43893) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S7v7v-0001oW-8m for qemu-devel@nongnu.org; Wed, 14 Mar 2012 16:48:55 -0400 Message-ID: <4F610431.7090005@weilnetz.de> Date: Wed, 14 Mar 2012 21:48:49 +0100 From: Stefan Weil MIME-Version: 1.0 References: <1331751444-30905-1-git-send-email-sw@weilnetz.de> <4F60ECB4.6050006@redhat.com> In-Reply-To: <4F60ECB4.6050006@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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: Eric Blake Cc: Kevin Wolf , qemu-devel@nongnu.org Am 14.03.2012 20:08, schrieb Eric Blake: > On 03/14/2012 12:57 PM, Stefan Weil wrote: >> qemu-img requires first options, then file name, then size. >> >> GNU getopt also allows options at the end, but POSIX getopt >> doesn't. Try "export POSIXLY_CORRECT=y" 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: I did not want to suggest that POSIXLY_CORRECT should always be set. It's just a way how maintainers can test that there is a problem with the current code, and that this problem is fixed by my patch. Passing -- in the command line will not only stop argument reordering, it also stops argument parsing which is not what we need here. Regards, Stefan W.