From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40731) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V6cKX-0003wW-5U for qemu-devel@nongnu.org; Tue, 06 Aug 2013 04:09:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V6cKR-0005IE-6v for qemu-devel@nongnu.org; Tue, 06 Aug 2013 04:09:21 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34774) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V6cKQ-0005HZ-Vl for qemu-devel@nongnu.org; Tue, 06 Aug 2013 04:09:15 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r7689EJB009545 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 6 Aug 2013 04:09:14 -0400 Date: Tue, 6 Aug 2013 10:09:12 +0200 From: Stefan Hajnoczi Message-ID: <20130806080912.GF27705@stefanha-thinkpad.redhat.com> References: <1375693060-16407-1-git-send-email-kwolf@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1375693060-16407-1-git-send-email-kwolf@redhat.com> Subject: Re: [Qemu-devel] [PATCH for-1.6] qemu-img: Error out for excess arguments List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: qemu-devel@nongnu.org On Mon, Aug 05, 2013 at 10:57:40AM +0200, Kevin Wolf wrote: > Don't silently ignore excess arguments at the end of the command line, > but error out instead. This can catch typos like 'resize test.img + 1G', > which doesn't increase the image size by 1G as intended, but truncates > the image to 1G. Even for less dangerous commands, the old behaviour is > confusing. > > Signed-off-by: Kevin Wolf > --- > qemu-img.c | 17 ++++++++++------- > 1 file changed, 10 insertions(+), 7 deletions(-) Reviewed-by: Stefan Hajnoczi