From patchwork Sun Oct 30 10:34:13 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Supriya Kannery X-Patchwork-Id: 122592 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 C7B5EB6F77 for ; Sun, 30 Oct 2011 21:35:06 +1100 (EST) Received: from localhost ([::1]:57539 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RKSjF-0002zF-Jr for incoming@patchwork.ozlabs.org; Sun, 30 Oct 2011 06:35:01 -0400 Received: from eggs.gnu.org ([140.186.70.92]:45773) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RKSj7-0002z7-Sg for qemu-devel@nongnu.org; Sun, 30 Oct 2011 06:34:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RKSj6-0002TI-Jn for qemu-devel@nongnu.org; Sun, 30 Oct 2011 06:34:53 -0400 Received: from e3.ny.us.ibm.com ([32.97.182.143]:58196) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RKSj6-0002TE-GA for qemu-devel@nongnu.org; Sun, 30 Oct 2011 06:34:52 -0400 Received: from /spool/local by e3.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Sun, 30 Oct 2011 06:34:52 -0400 Received: from d01relay01.pok.ibm.com ([9.56.227.233]) by e3.ny.us.ibm.com ([192.168.1.103]) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Sun, 30 Oct 2011 06:34:20 -0400 Received: from d01av04.pok.ibm.com (d01av04.pok.ibm.com [9.56.224.64]) by d01relay01.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p9UAYJsK290712 for ; Sun, 30 Oct 2011 06:34:19 -0400 Received: from d01av04.pok.ibm.com (loopback [127.0.0.1]) by d01av04.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p9UAYJfW005084 for ; Sun, 30 Oct 2011 06:34:19 -0400 Received: from skannery.in.ibm.com ([9.77.202.63]) by d01av04.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id p9UAYD1T004938; Sun, 30 Oct 2011 06:34:15 -0400 From: Supriya Kannery To: qemu-devel@nongnu.org Date: Sun, 30 Oct 2011 16:04:13 +0530 Message-Id: <20111030103413.31685.25371.sendpatchset@skannery.in.ibm.com> In-Reply-To: <20111030103327.31685.17045.sendpatchset@skannery.in.ibm.com> References: <20111030103327.31685.17045.sendpatchset@skannery.in.ibm.com> x-cbid: 11103010-8974-0000-0000-0000013CEEBF X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 32.97.182.143 Cc: Kevin Wolf , Stefan Hajnoczi , Christoph Hellwig Subject: [Qemu-devel] [v8 Patch 2/6]Qemu: Error classes for file reopen and data sync failure 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 New error classes defined for file reopen failure and data sync error Signed-off-by: Supriya Kannery --- qerror.c | 8 ++++++++ qerror.h | 6 ++++++ 2 files changed, 14 insertions(+) Index: qemu/qerror.c =================================================================== --- qemu.orig/qerror.c +++ qemu/qerror.c @@ -97,6 +97,14 @@ static const QErrorStringTable qerror_ta .desc = "Device '%(device)' is not removable", }, { + .error_fmt = QERR_DATA_SYNC_FAILED, + .desc = "Syncing of data failed for device '%(device)'", + }, + { + .error_fmt = QERR_REOPEN_FILE_FAILED, + .desc = "Could not reopen '%(filename)'", + }, + { .error_fmt = QERR_DEVICE_NO_BUS, .desc = "Device '%(device)' has no child bus", }, Index: qemu/qerror.h =================================================================== --- qemu.orig/qerror.h +++ qemu/qerror.h @@ -87,6 +87,9 @@ QError *qobject_to_qerror(const QObject #define QERR_DEVICE_NOT_FOUND \ "{ 'class': 'DeviceNotFound', 'data': { 'device': %s } }" +#define QERR_DATA_SYNC_FAILED \ + "{ 'class': 'DataSyncFailed', 'data': { 'device': %s } }" + #define QERR_DEVICE_NOT_REMOVABLE \ "{ 'class': 'DeviceNotRemovable', 'data': { 'device': %s } }" @@ -144,6 +147,9 @@ QError *qobject_to_qerror(const QObject #define QERR_OPEN_FILE_FAILED \ "{ 'class': 'OpenFileFailed', 'data': { 'filename': %s } }" +#define QERR_REOPEN_FILE_FAILED \ + "{ 'class': 'ReopenFileFailed', 'data': { 'filename': %s } }" + #define QERR_PROPERTY_NOT_FOUND \ "{ 'class': 'PropertyNotFound', 'data': { 'device': %s, 'property': %s } }"