From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:46347) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rlgyx-00062j-PU for qemu-devel@nongnu.org; Fri, 13 Jan 2012 08:15:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rlgyv-0007pO-U5 for qemu-devel@nongnu.org; Fri, 13 Jan 2012 08:15:47 -0500 Received: from e06smtp10.uk.ibm.com ([195.75.94.106]:34994) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rlgyv-0007pD-Jq for qemu-devel@nongnu.org; Fri, 13 Jan 2012 08:15:45 -0500 Received: from /spool/local by e06smtp10.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 13 Jan 2012 13:15:44 -0000 Received: from d06av07.portsmouth.uk.ibm.com (d06av07.portsmouth.uk.ibm.com [9.149.37.248]) by d06nrmr1507.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q0DDFaC01790056 for ; Fri, 13 Jan 2012 13:15:36 GMT Received: from d06av07.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av07.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q0DDFaMM026188 for ; Fri, 13 Jan 2012 06:15:36 -0700 From: Stefan Hajnoczi Date: Fri, 13 Jan 2012 13:14:14 +0000 Message-Id: <1326460457-19446-13-git-send-email-stefanha@linux.vnet.ibm.com> In-Reply-To: <1326460457-19446-1-git-send-email-stefanha@linux.vnet.ibm.com> References: <1326460457-19446-1-git-send-email-stefanha@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH v5 12/15] add QERR_BASE_NOT_FOUND List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Kevin Wolf , Marcelo Tosatti , Stefan Hajnoczi , Luiz Capitulino From: Marcelo Tosatti This qerror will be raised when a given streaming base (backing file) cannot be found. Signed-off-by: Marcelo Tosatti Signed-off-by: Stefan Hajnoczi --- qapi-schema.json | 1 + qerror.c | 4 ++++ qerror.h | 3 +++ 3 files changed, 8 insertions(+), 0 deletions(-) diff --git a/qapi-schema.json b/qapi-schema.json index b4f6b15..b778639 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -1335,6 +1335,7 @@ # If streaming is already active on this device, DeviceInUse # If @device does not exist, DeviceNotFound # If image streaming is not supported by this device, NotSupported +# If @base does not exist, BaseNotFound # # Since: 1.1 ## diff --git a/qerror.c b/qerror.c index feb3d35..272243491 100644 --- a/qerror.c +++ b/qerror.c @@ -49,6 +49,10 @@ static const QErrorStringTable qerror_table[] = { .desc = "Device '%(device)' can't go on a %(bad_bus_type) bus", }, { + .error_fmt = QERR_BASE_NOT_FOUND, + .desc = "Base '%(base)' not found", + }, + { .error_fmt = QERR_BLOCK_FORMAT_FEATURE_NOT_SUPPORTED, .desc = "Block format '%(format)' used by device '%(name)' does not support feature '%(feature)'", }, diff --git a/qerror.h b/qerror.h index 095ba9d..4351fe3 100644 --- a/qerror.h +++ b/qerror.h @@ -54,6 +54,9 @@ QError *qobject_to_qerror(const QObject *obj); #define QERR_BAD_BUS_FOR_DEVICE \ "{ 'class': 'BadBusForDevice', 'data': { 'device': %s, 'bad_bus_type': %s } }" +#define QERR_BASE_NOT_FOUND \ + "{ 'class': 'BaseNotFound', 'data': { 'base': %s } }" + #define QERR_BLOCK_FORMAT_FEATURE_NOT_SUPPORTED \ "{ 'class': 'BlockFormatFeatureNotSupported', 'data': { 'format': %s, 'name': %s, 'feature': %s } }" -- 1.7.7.3