diff options
author | Amit Shah <amit.shah@redhat.com> | 2009-11-03 19:59:56 +0530 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2009-11-17 08:03:31 -0600 |
commit | 127338e6107c0763a56451cc8da489349a1e82f7 (patch) | |
tree | 24c2c813a13fe92b7c6a072db32417d71c64d307 /qemu-char.c | |
parent | 57e073a3a152d0e63c3df257c60ababb19f2c13d (diff) | |
download | qemu-127338e6107c0763a56451cc8da489349a1e82f7.zip qemu-127338e6107c0763a56451cc8da489349a1e82f7.tar.gz qemu-127338e6107c0763a56451cc8da489349a1e82f7.tar.bz2 |
char: rename qemu_chr_reset to qemu_chr_generic_open
This function sends out the OPENED event to backends that
have drive the chardevs. The 'reset' is now a historical
artifact and we can now just call the function for what it
is.
Signed-off-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'qemu-char.c')
-rw-r--r-- | qemu-char.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/qemu-char.c b/qemu-char.c index d78bae3..5a81e8f 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -112,7 +112,7 @@ static void qemu_chr_event(CharDriverState *s, int event) s->chr_event(s->handler_opaque, event); } -static void qemu_chr_reset_bh(void *opaque) +static void qemu_chr_generic_open_bh(void *opaque) { CharDriverState *s = opaque; qemu_chr_event(s, CHR_EVENT_OPENED); @@ -120,10 +120,10 @@ static void qemu_chr_reset_bh(void *opaque) s->bh = NULL; } -void qemu_chr_reset(CharDriverState *s) +void qemu_chr_generic_open(CharDriverState *s) { if (s->bh == NULL) { - s->bh = qemu_bh_new(qemu_chr_reset_bh, s); + s->bh = qemu_bh_new(qemu_chr_generic_open_bh, s); qemu_bh_schedule(s->bh); } } @@ -610,7 +610,7 @@ static CharDriverState *qemu_chr_open_fd(int fd_in, int fd_out) chr->chr_update_read_handler = fd_chr_update_read_handler; chr->chr_close = fd_chr_close; - qemu_chr_reset(chr); + qemu_chr_generic_open(chr); return chr; } @@ -910,7 +910,7 @@ static void pty_chr_state(CharDriverState *chr, int connected) qemu_mod_timer(s->timer, qemu_get_clock(rt_clock) + 1000); } else { if (!s->connected) - qemu_chr_reset(chr); + qemu_chr_generic_open(chr); s->connected = 1; } } @@ -1184,7 +1184,7 @@ static CharDriverState *qemu_chr_open_tty(QemuOpts *opts) return NULL; } chr->chr_ioctl = tty_serial_ioctl; - qemu_chr_reset(chr); + qemu_chr_generic_open(chr); return chr; } #else /* ! __linux__ && ! __sun__ */ @@ -1330,7 +1330,7 @@ static CharDriverState *qemu_chr_open_pp(QemuOpts *opts) chr->chr_close = pp_close; chr->opaque = drv; - qemu_chr_reset(chr); + qemu_chr_generic_open(chr); return chr; } @@ -1611,7 +1611,7 @@ static CharDriverState *qemu_chr_open_win(QemuOpts *opts) free(chr); return NULL; } - qemu_chr_reset(chr); + qemu_chr_generic_open(chr); return chr; } @@ -1711,7 +1711,7 @@ static CharDriverState *qemu_chr_open_win_pipe(QemuOpts *opts) free(chr); return NULL; } - qemu_chr_reset(chr); + qemu_chr_generic_open(chr); return chr; } @@ -1725,7 +1725,7 @@ static CharDriverState *qemu_chr_open_win_file(HANDLE fd_out) s->hcom = fd_out; chr->opaque = s; chr->chr_write = win_chr_write; - qemu_chr_reset(chr); + qemu_chr_generic_open(chr); return chr; } @@ -2052,7 +2052,7 @@ static void tcp_chr_connect(void *opaque) s->connected = 1; qemu_set_fd_handler2(s->fd, tcp_chr_read_poll, tcp_chr_read, NULL, chr); - qemu_chr_reset(chr); + qemu_chr_generic_open(chr); } #define IACSET(x,a,b,c) x[0] = a; x[1] = b; x[2] = c; |