From patchwork Mon Mar 16 16:57:06 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Wolf X-Patchwork-Id: 450673 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 5BFED14009B for ; Tue, 17 Mar 2015 03:59:58 +1100 (AEDT) Received: from localhost ([::1]:50680 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YXYMu-0007YY-KT for incoming@patchwork.ozlabs.org; Mon, 16 Mar 2015 12:59:56 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53860) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YXYKb-00033t-So for qemu-devel@nongnu.org; Mon, 16 Mar 2015 12:57:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YXYKa-00022j-U5 for qemu-devel@nongnu.org; Mon, 16 Mar 2015 12:57:33 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35368) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YXYKX-00021W-Dc; Mon, 16 Mar 2015 12:57:29 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t2GGvSfI025220 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 16 Mar 2015 12:57:28 -0400 Received: from noname.redhat.com (ovpn-116-73.ams2.redhat.com [10.36.116.73]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t2GGvO9o019847; Mon, 16 Mar 2015 12:57:27 -0400 From: Kevin Wolf To: qemu-block@nongnu.org Date: Mon, 16 Mar 2015 17:57:06 +0100 Message-Id: <1426525041-21926-3-git-send-email-kwolf@redhat.com> In-Reply-To: <1426525041-21926-1-git-send-email-kwolf@redhat.com> References: <1426525041-21926-1-git-send-email-kwolf@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: kwolf@redhat.com, qemu-devel@nongnu.org Subject: [Qemu-devel] [PULL 02/17] qemu-img: Fix convert, amend error messages for unknown options X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Markus Armbruster Message quality regressed in commit dc523cd. Signed-off-by: Markus Armbruster Signed-off-by: Kevin Wolf --- qemu-img.c | 6 ++---- tests/qemu-iotests/061.out | 1 - 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index 5af6f45..82d9078 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -1554,8 +1554,7 @@ static int img_convert(int argc, char **argv) if (options) { qemu_opts_do_parse(opts, options, NULL, &local_err); if (local_err) { - error_report("Invalid options for file format '%s'", out_fmt); - error_free(local_err); + error_report_err(local_err); ret = -1; goto out; } @@ -3001,8 +3000,7 @@ static int img_amend(int argc, char **argv) if (options) { qemu_opts_do_parse(opts, options, NULL, &err); if (err) { - error_report("Invalid options for file format '%s'", fmt); - error_free(err); + error_report_err(err); ret = -1; goto out; } diff --git a/tests/qemu-iotests/061.out b/tests/qemu-iotests/061.out index e70f983..5ec248f 100644 --- a/tests/qemu-iotests/061.out +++ b/tests/qemu-iotests/061.out @@ -288,7 +288,6 @@ qemu-img: Error while amending options: Invalid argument Unknown compatibility level 0.42. qemu-img: Error while amending options: Invalid argument qemu-img: Invalid parameter 'foo' -qemu-img: Invalid options for file format 'qcow2' Changing the cluster size is not supported. qemu-img: Error while amending options: Operation not supported Changing the encryption flag is not supported.