summaryrefslogtreecommitdiff
path: root/qemu-char.h
diff options
context:
space:
mode:
authoraurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162>2009-01-18 14:08:04 +0000
committeraurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162>2009-01-18 14:08:04 +0000
commitceecf1d158d324c61a7ec1ba5de57dbc8a0f8373 (patch)
treebb58577711ef3fedae6ebbe731ac4da7f2d85bde /qemu-char.h
parent9c554c1c0b01642c39232489cef8301a7858824d (diff)
downloadqemu-ceecf1d158d324c61a7ec1ba5de57dbc8a0f8373.tar.gz
add an init function parameter to qemu_chr_open()
And use it for the malta emulation. Fix segfault introduced in revision 6352. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6365 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'qemu-char.h')
-rw-r--r--qemu-char.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/qemu-char.h b/qemu-char.h
index c64fc28c2e..bc0fcf3259 100644
--- a/qemu-char.h
+++ b/qemu-char.h
@@ -43,6 +43,7 @@ typedef struct {
typedef void IOEventHandler(void *opaque, int event);
struct CharDriverState {
+ void (*init)(struct CharDriverState *s);
int (*chr_write)(struct CharDriverState *s, const uint8_t *buf, int len);
void (*chr_update_read_handler)(struct CharDriverState *s);
int (*chr_ioctl)(struct CharDriverState *s, int cmd, void *arg);
@@ -61,7 +62,7 @@ struct CharDriverState {
TAILQ_ENTRY(CharDriverState) next;
};
-CharDriverState *qemu_chr_open(const char *label, const char *filename);
+CharDriverState *qemu_chr_open(const char *label, const char *filename, void (*init)(struct CharDriverState *s));
void qemu_chr_close(CharDriverState *chr);
void qemu_chr_printf(CharDriverState *s, const char *fmt, ...);
int qemu_chr_write(CharDriverState *s, const uint8_t *buf, int len);