From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:38291) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RR1Qi-00068W-Dn for qemu-devel@nongnu.org; Thu, 17 Nov 2011 07:51:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RR1Qe-0006pT-7i for qemu-devel@nongnu.org; Thu, 17 Nov 2011 07:51:00 -0500 Received: from mx1.redhat.com ([209.132.183.28]:5232) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RR1Qd-0006pN-St for qemu-devel@nongnu.org; Thu, 17 Nov 2011 07:50:56 -0500 Date: Thu, 17 Nov 2011 10:50:48 -0200 From: Luiz Capitulino Message-ID: <20111117105048.40ef4f9c@doriath> In-Reply-To: <20111111064735.15024.68351.sendpatchset@skannery.in.ibm.com> References: <20111111064707.15024.69847.sendpatchset@skannery.in.ibm.com> <20111111064735.15024.68351.sendpatchset@skannery.in.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [v9 Patch 2/6]Qemu: Error classes for file reopen and data sync failure List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Supriya Kannery Cc: Kevin Wolf , Stefan Hajnoczi , qemu-devel@nongnu.org, Christoph Hellwig On Fri, 11 Nov 2011 12:17:35 +0530 Supriya Kannery wrote: > 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)'", > + }, Is this really needed? I think you could use QERR_OPEN_FILE_FAILED. > + { > .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 } }" > >