From patchwork Wed Jan 18 14:40:52 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Hajnoczi X-Patchwork-Id: 136630 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 2F317B6F67 for ; Thu, 19 Jan 2012 01:44:30 +1100 (EST) Received: from localhost ([::1]:47365 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RnWkW-0008Dl-CP for incoming@patchwork.ozlabs.org; Wed, 18 Jan 2012 09:44:28 -0500 Received: from eggs.gnu.org ([140.186.70.92]:45031) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RnWkG-0007gw-DN for qemu-devel@nongnu.org; Wed, 18 Jan 2012 09:44:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RnWk7-00085N-7X for qemu-devel@nongnu.org; Wed, 18 Jan 2012 09:44:12 -0500 Received: from e06smtp12.uk.ibm.com ([195.75.94.108]:34816) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RnWk6-0007uu-UX for qemu-devel@nongnu.org; Wed, 18 Jan 2012 09:44:03 -0500 Received: from /spool/local by e06smtp12.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 18 Jan 2012 14:42:24 -0000 Received: from d06nrmr1407.portsmouth.uk.ibm.com ([9.149.38.185]) by e06smtp12.uk.ibm.com ([192.168.101.142]) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Wed, 18 Jan 2012 14:42:22 -0000 Received: from d06av04.portsmouth.uk.ibm.com (d06av04.portsmouth.uk.ibm.com [9.149.37.216]) by d06nrmr1407.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q0IEgLdp1945798 for ; Wed, 18 Jan 2012 14:42:21 GMT Received: from d06av04.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av04.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q0IEgK7F026238 for ; Wed, 18 Jan 2012 07:42:20 -0700 Received: from localhost (sig-9-145-203-19.de.ibm.com [9.145.203.19]) by d06av04.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id q0IEgJ8k026204; Wed, 18 Jan 2012 07:42:20 -0700 From: Stefan Hajnoczi To: Date: Wed, 18 Jan 2012 14:40:52 +0000 Message-Id: <1326897655-2799-14-git-send-email-stefanha@linux.vnet.ibm.com> X-Mailer: git-send-email 1.7.8.3 In-Reply-To: <1326897655-2799-1-git-send-email-stefanha@linux.vnet.ibm.com> References: <1326897655-2799-1-git-send-email-stefanha@linux.vnet.ibm.com> x-cbid: 12011814-8372-0000-0000-000001702A14 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 195.75.94.108 Cc: Kevin Wolf , Marcelo Tosatti , Stefan Hajnoczi Subject: [Qemu-devel] [PATCH v6 13/16] add QERR_BASE_NOT_FOUND X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 } }"