qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [RFC PATCH 03/16] qemu-file: Add set/get tmp_visitor


From: Dr. David Alan Gilbert (git)
Subject: [Qemu-devel] [RFC PATCH 03/16] qemu-file: Add set/get tmp_visitor
Date: Tue, 25 Mar 2014 20:17:14 +0000

From: "Dr. David Alan Gilbert" <address@hidden>

Signed-off-by: Dr. David Alan Gilbert <address@hidden>
---
 include/migration/qemu-file.h |  4 ++++
 qemu-file.c                   | 12 ++++++++++++
 2 files changed, 16 insertions(+)

diff --git a/include/migration/qemu-file.h b/include/migration/qemu-file.h
index f066801..e36c03f 100644
--- a/include/migration/qemu-file.h
+++ b/include/migration/qemu-file.h
@@ -174,6 +174,10 @@ int qemu_file_get_error(QEMUFile *f);
 void qemu_file_set_error(QEMUFile *f, int ret);
 void qemu_fflush(QEMUFile *f);
 
+/* TRANSITION ONLY - DON'T USE! */
+Visitor *qemu_file_get_tmp_visitor(QEMUFile *f);
+void qemu_file_set_tmp_visitor(QEMUFile *f, Visitor *v);
+
 static inline void qemu_put_be64s(QEMUFile *f, const uint64_t *pv)
 {
     qemu_put_be64(f, *pv);
diff --git a/qemu-file.c b/qemu-file.c
index b1b1a5b..feb3e68 100644
--- a/qemu-file.c
+++ b/qemu-file.c
@@ -25,6 +25,8 @@ struct QEMUFile {
     unsigned int iovcnt;
 
     int last_error;
+
+    Visitor *tmp_visitor;
 };
 
 typedef struct QEMUFileStdio {
@@ -37,6 +39,16 @@ typedef struct QEMUFileSocket {
     QEMUFile *file;
 } QEMUFileSocket;
 
+Visitor *qemu_file_get_tmp_visitor(QEMUFile *f)
+{
+    return f->tmp_visitor;
+}
+
+void qemu_file_set_tmp_visitor(QEMUFile *f, Visitor *v)
+{
+    f->tmp_visitor = v;
+}
+
 static ssize_t socket_writev_buffer(void *opaque, struct iovec *iov, int 
iovcnt,
                                     int64_t pos)
 {
-- 
1.8.5.3




reply via email to

[Prev in Thread] Current Thread [Next in Thread]