From patchwork Thu Feb 11 01:50:07 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luiz Capitulino X-Patchwork-Id: 45103 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id A29E9B7C33 for ; Thu, 11 Feb 2010 13:31:20 +1100 (EST) Received: from localhost ([127.0.0.1]:37027 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NfOpI-0007rg-V0 for incoming@patchwork.ozlabs.org; Wed, 10 Feb 2010 21:30:44 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NfOD7-0007a2-Sg for qemu-devel@nongnu.org; Wed, 10 Feb 2010 20:51:17 -0500 Received: from [199.232.76.173] (port=57768 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NfOD7-0007ZS-CF for qemu-devel@nongnu.org; Wed, 10 Feb 2010 20:51:17 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NfOD6-0001Lu-89 for qemu-devel@nongnu.org; Wed, 10 Feb 2010 20:51:17 -0500 Received: from mx1.redhat.com ([209.132.183.28]:13514) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NfOD5-0001Lq-SV for qemu-devel@nongnu.org; Wed, 10 Feb 2010 20:51:16 -0500 Received: from int-mx04.intmail.prod.int.phx2.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.17]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o1B1pFGY009102 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 10 Feb 2010 20:51:15 -0500 Received: from localhost (vpn-10-105.rdu.redhat.com [10.11.10.105]) by int-mx04.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o1B1pD3r031301; Wed, 10 Feb 2010 20:51:14 -0500 From: Luiz Capitulino To: qemu-devel@nongnu.org Date: Wed, 10 Feb 2010 23:50:07 -0200 Message-Id: <1265853007-27300-22-git-send-email-lcapitulino@redhat.com> In-Reply-To: <1265853007-27300-1-git-send-email-lcapitulino@redhat.com> References: <1265853007-27300-1-git-send-email-lcapitulino@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.17 X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Cc: armbru@redhat.com Subject: [Qemu-devel] [PATCH 21/21] Monitor: Report more than one error in handlers X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Handlers can generate only one error in a call, we let the programmer know if they brake this rule and clients will only get the first generated error. Signed-off-by: Luiz Capitulino --- monitor.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/monitor.c b/monitor.c index d9592e9..6a64e6e 100644 --- a/monitor.c +++ b/monitor.c @@ -4760,7 +4760,8 @@ void qemu_error_internal(const char *file, int linenr, const char *func, if (!qemu_error_sink->mon->error) { qemu_error_sink->mon->error = qerror; } else { - /* XXX: warn the programmer */ + MON_DEBUG("Additional error report at %s:%d\n", qerror->file, + qerror->linenr); QDECREF(qerror); } break;