[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [v9 Patch 2/6]Qemu: Error classes for file reopen and d
From: |
Luiz Capitulino |
Subject: |
Re: [Qemu-devel] [v9 Patch 2/6]Qemu: Error classes for file reopen and data sync failure |
Date: |
Thu, 17 Nov 2011 10:50:48 -0200 |
On Fri, 11 Nov 2011 12:17:35 +0530
Supriya Kannery <address@hidden> wrote:
> New error classes defined for file reopen failure and data
> sync error
>
> Signed-off-by: Supriya Kannery <address@hidden>
>
> ---
> 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 }
> }"
>
>
[Qemu-devel] [v9 Patch 3/6]Qemu: Cmd "block_set_hostcache" for dynamic cache change, Supriya Kannery, 2011/11/11
Re: [Qemu-devel] [v9 Patch 3/6]Qemu: Cmd "block_set_hostcache" for dynamic cache change, Luiz Capitulino, 2011/11/17
[Qemu-devel] [v9 Patch 4/6]Qemu: Add commandline -drive option 'hostcache', Supriya Kannery, 2011/11/11