aboutsummaryrefslogtreecommitdiff
path: root/qemu-char.h
diff options
context:
space:
mode:
authorLuiz Capitulino <lcapitulino@redhat.com>2010-10-22 16:09:05 -0200
committerLuiz Capitulino <lcapitulino@redhat.com>2010-11-17 09:52:24 -0200
commit999bd67c879cbd8bf0fe2b4ff0fb308a9a48ec72 (patch)
tree8560fa496e0580671bc84b6eea31d2dc8bdacddf /qemu-char.h
parent4cdbc094ca3865696c1456f1586818766bf9aae6 (diff)
qemu-char: Introduce Memory driver
This driver handles in-memory chardev operations. That's, all writes to this driver are stored in an internal buffer and it doesn't talk to the external world in any way. Right now it's very simple: it supports only writes. But it can be easily extended to support more operations. This is going to be used by the monitor's "HMP passthrough via QMP" feature, which needs to run monitor handlers without a backing device. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Diffstat (limited to 'qemu-char.h')
-rw-r--r--qemu-char.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/qemu-char.h b/qemu-char.h
index 18ad12bb5d..e6ee6c4bc9 100644
--- a/qemu-char.h
+++ b/qemu-char.h
@@ -6,6 +6,7 @@
#include "qemu-option.h"
#include "qemu-config.h"
#include "qobject.h"
+#include "qstring.h"
/* character device */
@@ -100,6 +101,12 @@ CharDriverState *qemu_chr_open_eventfd(int eventfd);
extern int term_escape_char;
+/* memory chardev */
+void qemu_chr_init_mem(CharDriverState *chr);
+void qemu_chr_close_mem(CharDriverState *chr);
+QString *qemu_chr_mem_to_qs(CharDriverState *chr);
+size_t qemu_chr_mem_osize(const CharDriverState *chr);
+
/* async I/O support */
int qemu_set_fd_handler2(int fd,