From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:37244) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QHDgF-0007ey-H5 for qemu-devel@nongnu.org; Tue, 03 May 2011 07:22:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QHDgE-0008Kb-Gd for qemu-devel@nongnu.org; Tue, 03 May 2011 07:22:15 -0400 Received: from mail-yx0-f173.google.com ([209.85.213.173]:49640) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QHDgE-0008KR-EE for qemu-devel@nongnu.org; Tue, 03 May 2011 07:22:14 -0400 Received: by yxk8 with SMTP id 8so2451997yxk.4 for ; Tue, 03 May 2011 04:22:13 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <1304067992-7088-1-git-send-email-kwolf@redhat.com> References: <1304067992-7088-1-git-send-email-kwolf@redhat.com> Date: Tue, 3 May 2011 12:22:13 +0100 Message-ID: From: Stefan Hajnoczi Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] qemu-img resize: Fix option parsing List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: qemu-devel@nongnu.org On Fri, Apr 29, 2011 at 10:06 AM, Kevin Wolf wrote: > For shrinking images, you're supposed to use a negative size. However, th= e > leading minus makes getopt think that it's an option and so you get the h= elp > text if you don't use -- like in 'qemu-img resize test.img -- -1G'. > > This patch handles the size first and removes it from the argument list s= o that > getopt won't even try to interpret it and you don't need -- any more. > > Signed-off-by: Kevin Wolf > --- > =A0qemu-img.c | =A0 13 +++++++++++-- > =A01 files changed, 11 insertions(+), 2 deletions(-) Reviewed-by: Stefan Hajnoczi