Patchwork [11/12,v11] QError: Introduce new error for the dump-guest-memory command

login
register
mail settings
Submitter Wen Congyang
Date March 26, 2012, 10:06 a.m.
Message ID <4F703F92.7060308@cn.fujitsu.com>
Download mbox | patch
Permalink /patch/148681/
State New
Headers show

Comments

Wen Congyang - March 26, 2012, 10:06 a.m.
The new error is QERR_PIPE_OR_SOCKET_FD, which is going to be
used by the QAPI dump-guest-memory command.

Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
---
 qerror.c |    4 ++++
 qerror.h |    3 +++
 2 files changed, 7 insertions(+), 0 deletions(-)

Patch

diff --git a/qerror.c b/qerror.c
index 41c729a..d5b3a8c 100644
--- a/qerror.c
+++ b/qerror.c
@@ -299,6 +299,10 @@  static const QErrorStringTable qerror_table[] = {
         .error_fmt = QERR_VNC_SERVER_FAILED,
         .desc      = "Could not start VNC server on %(target)",
     },
+    {
+        .error_fmt = QERR_PIPE_OR_SOCKET_FD,
+        .desc      = "lseek() failed: the fd is associated with a pipe, socket",
+    },
     {}
 };
 
diff --git a/qerror.h b/qerror.h
index e16f9c2..6b5e8f7 100644
--- a/qerror.h
+++ b/qerror.h
@@ -244,4 +244,7 @@  QError *qobject_to_qerror(const QObject *obj);
 #define QERR_VNC_SERVER_FAILED \
     "{ 'class': 'VNCServerFailed', 'data': { 'target': %s } }"
 
+#define QERR_PIPE_OR_SOCKET_FD \
+    "{ 'class': 'PipeOrSocketFD', 'data': {} }"
+
 #endif /* QERROR_H */