Revision ceecf1d1 qemu-char.h

b/qemu-char.h
43 43
typedef void IOEventHandler(void *opaque, int event);
44 44

  
45 45
struct CharDriverState {
46
    void (*init)(struct CharDriverState *s);
46 47
    int (*chr_write)(struct CharDriverState *s, const uint8_t *buf, int len);
47 48
    void (*chr_update_read_handler)(struct CharDriverState *s);
48 49
    int (*chr_ioctl)(struct CharDriverState *s, int cmd, void *arg);
......
61 62
    TAILQ_ENTRY(CharDriverState) next;
62 63
};
63 64

  
64
CharDriverState *qemu_chr_open(const char *label, const char *filename);
65
CharDriverState *qemu_chr_open(const char *label, const char *filename, void (*init)(struct CharDriverState *s));
65 66
void qemu_chr_close(CharDriverState *chr);
66 67
void qemu_chr_printf(CharDriverState *s, const char *fmt, ...);
67 68
int qemu_chr_write(CharDriverState *s, const uint8_t *buf, int len);

Also available in: Unified diff