Received: from eggs.gnu.org ([2001:4830:134:3::10]:40901) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gCVI7-00084O-7s for qemu-devel@nongnu.org; Tue, 16 Oct 2018 15:46:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gCVI3-0000qa-Qq for qemu-devel@nongnu.org; Tue, 16 Oct 2018 15:46:07 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50098) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gCVI3-0000pi-KT for qemu-devel@nongnu.org; Tue, 16 Oct 2018 15:46:03 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 79D02750C8 for ; Tue, 16 Oct 2018 19:46:02 +0000 (UTC) References: <20181016174158.15229-1-armbru@redhat.com> <20181016174158.15229-37-armbru@redhat.com> From: Eric Blake Message-ID: <4db2bc1f-cafd-955d-2b00-8124e06bc027@redhat.com> Date: Tue, 16 Oct 2018 14:46:01 -0500 MIME-Version: 1.0 In-Reply-To: <20181016174158.15229-37-armbru@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v3 36/38] block: Clean up bdrv_img_create()'s error reporting List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster , qemu-devel@nongnu.org On 10/16/18 12:41 PM, Markus Armbruster wrote: > bdrv_img_create() takes an Error ** argument and uses it in the > conventional way, except for one place: when qemu_opts_do_parse() > fails, it first reports its error to stderr or the HMP monitor with > error_report_err(), then error_setg()'s a generic error. > > When the caller reports that second error similarly, this produces two > consecutive error messages on stderr or the HMP monitor. > > When the caller does something else with it, such as send it via QMP, > the first error still goes to stderr or the HMP monitor. Fortunately, > no such caller exists. > > Simply use the first error as is. > > Signed-off-by: Markus Armbruster > --- > block.c | 3 --- > 1 file changed, 3 deletions(-) Reviewed-by: Eric Blake -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org