Received: from eggs.gnu.org ([2001:4830:134:3::10]:44448) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YtB8w-0004zf-PN for qemu-devel@nongnu.org; Fri, 15 May 2015 04:38:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YtB8s-0002A5-PG for qemu-devel@nongnu.org; Fri, 15 May 2015 04:38:54 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33609) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YtB8s-0002A1-Kc for qemu-devel@nongnu.org; Fri, 15 May 2015 04:38:50 -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 (Postfix) with ESMTPS id 4A6D7B6A26 for ; Fri, 15 May 2015 08:38:50 +0000 (UTC) From: Markus Armbruster References: <1431432187-10993-1-git-send-email-armbru@redhat.com> <1431432187-10993-4-git-send-email-armbru@redhat.com> <5554C827.1050402@redhat.com> Date: Fri, 15 May 2015 10:38:47 +0200 In-Reply-To: <5554C827.1050402@redhat.com> (Eric Blake's message of "Thu, 14 May 2015 10:07:03 -0600") Message-ID: <87lhgqnsko.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH 03/15] net: Improve -net nic error reporting List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: qemu-devel@nongnu.org, stefanha@redhat.com Eric Blake writes: > On 05/12/2015 06:02 AM, Markus Armbruster wrote: >> When -net nic fails, it first reports a specific error, then a generic >> one, like this: >> >> $ qemu-system-x86_64 -net nic,netdev=nonexistant >> qemu-system-x86_64: -net nic,netdev=nonexistant: netdev >> nonexistant' not found >> qemu-system-x86_64: -net nic,netdev=nonexistant: Device 'nic' >> could not be initialized > > s/nonexistant/nonexistent/g Fixing... >> >> Convert net_init_nic() to Error to get rid of the unwanted second >> error message. >> >> Signed-off-by: Markus Armbruster >> --- >> net/net.c | 12 ++++++------ >> 1 file changed, 6 insertions(+), 6 deletions(-) >> > >> @@ -745,7 +744,7 @@ static int net_init_nic(const NetClientOptions *opts, const char *name, >> >> idx = nic_get_free_idx(); >> if (idx == -1 || nb_nics >= MAX_NICS) { >> - error_report("Too Many NICs"); >> + error_setg(errp, "Too Many NICs"); > > worth s/Many/many/ while touching this? Yup. > Reviewed-by: Eric Blake Thanks!