From patchwork Thu Mar 25 16:22:39 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markus Armbruster X-Patchwork-Id: 48541 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 956CFB7CCD for ; Fri, 26 Mar 2010 03:49:20 +1100 (EST) Received: from localhost ([127.0.0.1]:54436 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NuqFA-0000Br-NW for incoming@patchwork.ozlabs.org; Thu, 25 Mar 2010 12:49:16 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Nuppn-0005m5-Ba for qemu-devel@nongnu.org; Thu, 25 Mar 2010 12:23:03 -0400 Received: from [140.186.70.92] (port=36011 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nuppb-0005b3-TU for qemu-devel@nongnu.org; Thu, 25 Mar 2010 12:22:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NuppU-0001Fp-Qn for qemu-devel@nongnu.org; Thu, 25 Mar 2010 12:22:51 -0400 Received: from oxygen.pond.sub.org ([213.239.205.148]:52315) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NuppU-0001F1-ER for qemu-devel@nongnu.org; Thu, 25 Mar 2010 12:22:44 -0400 Received: from blackfin.pond.sub.org (pD9E38AC7.dip.t-dialin.net [217.227.138.199]) by oxygen.pond.sub.org (Postfix) with ESMTPA id 0D81B276DB9 for ; Thu, 25 Mar 2010 17:22:42 +0100 (CET) Received: by blackfin.pond.sub.org (Postfix, from userid 500) id 400AD1D8; Thu, 25 Mar 2010 17:22:41 +0100 (CET) From: Markus Armbruster To: qemu-devel@nongnu.org Date: Thu, 25 Mar 2010 17:22:39 +0100 Message-Id: <1269534160-4550-11-git-send-email-armbru@redhat.com> X-Mailer: git-send-email 1.6.6.1 In-Reply-To: <1269534160-4550-1-git-send-email-armbru@redhat.com> References: <1269534160-4550-1-git-send-email-armbru@redhat.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) Cc: lcapitulino@redhat.com Subject: [Qemu-devel] [PATCH v3 10/11] 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 Signed-off-by: Markus Armbruster --- 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 } }"