From patchwork Mon Apr 5 20:33:54 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luiz Capitulino X-Patchwork-Id: 49457 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 E90CCB7CFA for ; Tue, 6 Apr 2010 08:09:23 +1000 (EST) Received: from localhost ([127.0.0.1]:53205 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NytQW-0008Lr-Rz for incoming@patchwork.ozlabs.org; Mon, 05 Apr 2010 17:01:44 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Nyt3X-0002HV-EF for qemu-devel@nongnu.org; Mon, 05 Apr 2010 16:37:59 -0400 Received: from [140.186.70.92] (port=49501 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nyt3V-0001Wi-Pb for qemu-devel@nongnu.org; Mon, 05 Apr 2010 16:37:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Nyt0M-0001dV-Ql for qemu-devel@nongnu.org; Mon, 05 Apr 2010 16:34:45 -0400 Received: from mx1.redhat.com ([209.132.183.28]:53921) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nyt0M-0001dL-Iw for qemu-devel@nongnu.org; Mon, 05 Apr 2010 16:34:42 -0400 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 o35KYfXE030136 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 5 Apr 2010 16:34:41 -0400 Received: from localhost (vpn-8-191.rdu.redhat.com [10.11.8.191]) by int-mx04.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o35KYe66025662; Mon, 5 Apr 2010 16:34:41 -0400 From: Luiz Capitulino To: aliguori@us.ibm.com Date: Mon, 5 Apr 2010 17:33:54 -0300 Message-Id: <1270499642-31543-14-git-send-email-lcapitulino@redhat.com> In-Reply-To: <1270499642-31543-1-git-send-email-lcapitulino@redhat.com> References: <1270499642-31543-1-git-send-email-lcapitulino@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.17 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. Cc: Luiz Capitulino , qemu-devel@nongnu.org, Markus Armbruster Subject: [Qemu-devel] [PATCH 13/21] error: New QERR_DEVICE_IN_USE 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 From: Markus Armbruster Signed-off-by: Markus Armbruster Signed-off-by: Luiz Capitulino --- qerror.c | 4 ++++ qerror.h | 3 +++ 2 files changed, 7 insertions(+), 0 deletions(-) diff --git a/qerror.c b/qerror.c index 97e8d4a..8d885cd 100644 --- a/qerror.c +++ b/qerror.c @@ -69,6 +69,10 @@ static const QErrorStringTable qerror_table[] = { .desc = "Device '%(device)' could not be initialized", }, { + .error_fmt = QERR_DEVICE_IN_USE, + .desc = "Device '%(device)' is in use", + }, + { .error_fmt = QERR_DEVICE_LOCKED, .desc = "Device '%(device)' is locked", }, diff --git a/qerror.h b/qerror.h index 5625d54..bae08c0 100644 --- a/qerror.h +++ b/qerror.h @@ -67,6 +67,9 @@ QError *qobject_to_qerror(const QObject *obj); #define QERR_DEVICE_INIT_FAILED \ "{ 'class': 'DeviceInitFailed', 'data': { 'device': %s } }" +#define QERR_DEVICE_IN_USE \ + "{ 'class': 'DeviceInUse', 'data': { 'device': %s } }" + #define QERR_DEVICE_LOCKED \ "{ 'class': 'DeviceLocked', 'data': { 'device': %s } }"