提交 7b27a769 编写于 作者: J Juan Quintela 提交者: Anthony Liguori

rename IOCanRWHandler to IOCanReadHandler

It was always only used for reads
Signed-off-by: NJuan Quintela <quintela@redhat.com>
Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
上级 1c39e2a2
...@@ -182,7 +182,7 @@ void qemu_chr_send_event(CharDriverState *s, int event) ...@@ -182,7 +182,7 @@ void qemu_chr_send_event(CharDriverState *s, int event)
} }
void qemu_chr_add_handlers(CharDriverState *s, void qemu_chr_add_handlers(CharDriverState *s,
IOCanRWHandler *fd_can_read, IOCanReadHandler *fd_can_read,
IOReadHandler *fd_read, IOReadHandler *fd_read,
IOEventHandler *fd_event, IOEventHandler *fd_event,
void *opaque) void *opaque)
...@@ -214,7 +214,7 @@ static CharDriverState *qemu_chr_open_null(QemuOpts *opts) ...@@ -214,7 +214,7 @@ static CharDriverState *qemu_chr_open_null(QemuOpts *opts)
#define MUX_BUFFER_SIZE 32 /* Must be a power of 2. */ #define MUX_BUFFER_SIZE 32 /* Must be a power of 2. */
#define MUX_BUFFER_MASK (MUX_BUFFER_SIZE - 1) #define MUX_BUFFER_MASK (MUX_BUFFER_SIZE - 1)
typedef struct { typedef struct {
IOCanRWHandler *chr_can_read[MAX_MUX]; IOCanReadHandler *chr_can_read[MAX_MUX];
IOReadHandler *chr_read[MAX_MUX]; IOReadHandler *chr_read[MAX_MUX];
IOEventHandler *chr_event[MAX_MUX]; IOEventHandler *chr_event[MAX_MUX];
void *ext_opaque[MAX_MUX]; void *ext_opaque[MAX_MUX];
......
...@@ -57,7 +57,7 @@ struct CharDriverState { ...@@ -57,7 +57,7 @@ struct CharDriverState {
int (*chr_ioctl)(struct CharDriverState *s, int cmd, void *arg); int (*chr_ioctl)(struct CharDriverState *s, int cmd, void *arg);
int (*get_msgfd)(struct CharDriverState *s); int (*get_msgfd)(struct CharDriverState *s);
IOEventHandler *chr_event; IOEventHandler *chr_event;
IOCanRWHandler *chr_can_read; IOCanReadHandler *chr_can_read;
IOReadHandler *chr_read; IOReadHandler *chr_read;
void *handler_opaque; void *handler_opaque;
void (*chr_send_event)(struct CharDriverState *chr, int event); void (*chr_send_event)(struct CharDriverState *chr, int event);
...@@ -79,7 +79,7 @@ void qemu_chr_printf(CharDriverState *s, const char *fmt, ...); ...@@ -79,7 +79,7 @@ void qemu_chr_printf(CharDriverState *s, const char *fmt, ...);
int qemu_chr_write(CharDriverState *s, const uint8_t *buf, int len); int qemu_chr_write(CharDriverState *s, const uint8_t *buf, int len);
void qemu_chr_send_event(CharDriverState *s, int event); void qemu_chr_send_event(CharDriverState *s, int event);
void qemu_chr_add_handlers(CharDriverState *s, void qemu_chr_add_handlers(CharDriverState *s,
IOCanRWHandler *fd_can_read, IOCanReadHandler *fd_can_read,
IOReadHandler *fd_read, IOReadHandler *fd_read,
IOEventHandler *fd_event, IOEventHandler *fd_event,
void *opaque); void *opaque);
...@@ -98,7 +98,7 @@ extern int term_escape_char; ...@@ -98,7 +98,7 @@ extern int term_escape_char;
/* async I/O support */ /* async I/O support */
int qemu_set_fd_handler2(int fd, int qemu_set_fd_handler2(int fd,
IOCanRWHandler *fd_read_poll, IOCanReadHandler *fd_read_poll,
IOHandler *fd_read, IOHandler *fd_read,
IOHandler *fd_write, IOHandler *fd_write,
void *opaque); void *opaque);
...@@ -106,5 +106,4 @@ int qemu_set_fd_handler(int fd, ...@@ -106,5 +106,4 @@ int qemu_set_fd_handler(int fd,
IOHandler *fd_read, IOHandler *fd_read,
IOHandler *fd_write, IOHandler *fd_write,
void *opaque); void *opaque);
#endif #endif
...@@ -184,7 +184,7 @@ void QEMU_NORETURN hw_error(const char *fmt, ...) ...@@ -184,7 +184,7 @@ void QEMU_NORETURN hw_error(const char *fmt, ...)
/* IO callbacks. */ /* IO callbacks. */
typedef void IOReadHandler(void *opaque, const uint8_t *buf, int size); typedef void IOReadHandler(void *opaque, const uint8_t *buf, int size);
typedef int IOCanRWHandler(void *opaque); typedef int IOCanReadHandler(void *opaque);
typedef void IOHandler(void *opaque); typedef void IOHandler(void *opaque);
struct ParallelIOArg { struct ParallelIOArg {
......
...@@ -89,7 +89,7 @@ void qemu_bh_delete(QEMUBH *bh) ...@@ -89,7 +89,7 @@ void qemu_bh_delete(QEMUBH *bh)
} }
int qemu_set_fd_handler2(int fd, int qemu_set_fd_handler2(int fd,
IOCanRWHandler *fd_read_poll, IOCanReadHandler *fd_read_poll,
IOHandler *fd_read, IOHandler *fd_read,
IOHandler *fd_write, IOHandler *fd_write,
void *opaque) void *opaque)
......
...@@ -1550,7 +1550,7 @@ void pcmcia_info(Monitor *mon) ...@@ -1550,7 +1550,7 @@ void pcmcia_info(Monitor *mon)
typedef struct IOHandlerRecord { typedef struct IOHandlerRecord {
int fd; int fd;
IOCanRWHandler *fd_read_poll; IOCanReadHandler *fd_read_poll;
IOHandler *fd_read; IOHandler *fd_read;
IOHandler *fd_write; IOHandler *fd_write;
int deleted; int deleted;
...@@ -1567,7 +1567,7 @@ static QLIST_HEAD(, IOHandlerRecord) io_handlers = ...@@ -1567,7 +1567,7 @@ static QLIST_HEAD(, IOHandlerRecord) io_handlers =
/* XXX: fd_read_poll should be suppressed, but an API change is /* XXX: fd_read_poll should be suppressed, but an API change is
necessary in the character devices to suppress fd_can_read(). */ necessary in the character devices to suppress fd_can_read(). */
int qemu_set_fd_handler2(int fd, int qemu_set_fd_handler2(int fd,
IOCanRWHandler *fd_read_poll, IOCanReadHandler *fd_read_poll,
IOHandler *fd_read, IOHandler *fd_read,
IOHandler *fd_write, IOHandler *fd_write,
void *opaque) void *opaque)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册