From patchwork Sat Mar 14 09:23:15 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markus Armbruster X-Patchwork-Id: 450176 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 D5AB914017B for ; Sat, 14 Mar 2015 20:24:47 +1100 (AEDT) Received: from localhost ([::1]:40166 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YWiJJ-0001Ss-RQ for incoming@patchwork.ozlabs.org; Sat, 14 Mar 2015 05:24:45 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38910) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YWiII-0008Hb-HZ for qemu-devel@nongnu.org; Sat, 14 Mar 2015 05:23:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YWiIF-0001k6-6m for qemu-devel@nongnu.org; Sat, 14 Mar 2015 05:23:42 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35831) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YWiHu-0001fv-Tc; Sat, 14 Mar 2015 05:23:19 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t2E9NI6v009979 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Sat, 14 Mar 2015 05:23:18 -0400 Received: from blackfin.pond.sub.org (ovpn-116-36.ams2.redhat.com [10.36.116.36]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t2E9NGm5010088 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sat, 14 Mar 2015 05:23:17 -0400 Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 76516305E2DB; Sat, 14 Mar 2015 10:23:15 +0100 (CET) From: Markus Armbruster To: qemu-devel@nongnu.org Date: Sat, 14 Mar 2015 10:23:15 +0100 Message-Id: <1426324995-28192-3-git-send-email-armbru@redhat.com> In-Reply-To: <1426324995-28192-1-git-send-email-armbru@redhat.com> References: <1426324995-28192-1-git-send-email-armbru@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: kwolf@redhat.com, stefanha@redhat.com, qemu-block@nongnu.org, mreitz@redhat.com Subject: [Qemu-devel] [PATCH 2/2] 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 Message quality regressed in commit dc523cd. Signed-off-by: Markus Armbruster --- 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.