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

login
register
mail settings
Submitter Wen Congyang
Date April 18, 2012, 7:29 a.m.
Message ID <4F8E6D5B.8070107@cn.fujitsu.com>
Download mbox | patch
Permalink /patch/153419/
State New
Headers show

Comments

Wen Congyang - April 18, 2012, 7:29 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 96fbe71..117c42f 100644
--- a/qerror.c
+++ b/qerror.c
@@ -304,6 +304,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 5c23c1f..e28cdad 100644
--- a/qerror.h
+++ b/qerror.h
@@ -248,4 +248,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 */