From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NteFu-0006dB-7p for qemu-devel@nongnu.org; Mon, 22 Mar 2010 05:49:06 -0400 Received: from [199.232.76.173] (port=57956 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NteFs-0006c2-GH for qemu-devel@nongnu.org; Mon, 22 Mar 2010 05:49:04 -0400 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NteFo-0007SA-9Q for qemu-devel@nongnu.org; Mon, 22 Mar 2010 05:49:03 -0400 Received: from oxygen.pond.sub.org ([213.239.205.148]:54262) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NteFn-0007Ry-3I for qemu-devel@nongnu.org; Mon, 22 Mar 2010 05:48:59 -0400 Received: from blackfin.pond.sub.org (pD951ABC6.dip.t-dialin.net [217.81.171.198]) by oxygen.pond.sub.org (Postfix) with ESMTPA id B7228276DB5 for ; Mon, 22 Mar 2010 10:48:54 +0100 (CET) From: Markus Armbruster Date: Mon, 22 Mar 2010 10:48:52 +0100 Message-Id: <1269251333-20821-11-git-send-email-armbru@redhat.com> In-Reply-To: <1269251333-20821-1-git-send-email-armbru@redhat.com> References: <1269251333-20821-1-git-send-email-armbru@redhat.com> Subject: [Qemu-devel] [PATCH v2 10/11] error: New QERR_DEVICE_IN_USE List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: lcapitulino@redhat.com 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 } }" -- 1.6.6.1