if (size == 0) {
/* FD has been closed. Remove it from the active list. */
qemu_set_fd_handler2(s->fd_in, NULL, NULL, NULL, NULL);
+ qemu_chr_event(chr, CHR_EVENT_CLOSED);
return;
}
if (size > 0) {
}
qemu_free(s);
+ qemu_chr_event(chr, CHR_EVENT_CLOSED);
}
/* open a character device to a unix fd */
if (size == 0) {
/* stdin has been closed. Remove it from the active list. */
qemu_set_fd_handler2(0, NULL, NULL, NULL, NULL);
+ qemu_chr_event(chr, CHR_EVENT_CLOSED);
return;
}
if (size > 0) {
qemu_del_timer(s->timer);
qemu_free_timer(s->timer);
qemu_free(s);
+ qemu_chr_event(chr, CHR_EVENT_CLOSED);
}
static CharDriverState *qemu_chr_open_pty(void)
ioctl(fd, PPRELEASE);
close(fd);
qemu_free(drv);
+ qemu_chr_event(chr, CHR_EVENT_CLOSED);
}
static CharDriverState *qemu_chr_open_pp(const char *filename)
qemu_del_polling_cb(win_chr_pipe_poll, chr);
else
qemu_del_polling_cb(win_chr_poll, chr);
+
+ qemu_chr_event(chr, CHR_EVENT_CLOSED);
}
static int win_chr_init(CharDriverState *chr, const char *filename)
closesocket(s->fd);
}
qemu_free(s);
+ qemu_chr_event(chr, CHR_EVENT_CLOSED);
}
static CharDriverState *qemu_chr_open_udp(const char *def)
qemu_set_fd_handler(s->fd, NULL, NULL, NULL);
closesocket(s->fd);
s->fd = -1;
+ qemu_chr_event(chr, CHR_EVENT_CLOSED);
} else if (size > 0) {
if (s->do_telnetopt)
tcp_chr_process_IAC_bytes(chr, s, buf, &size);
closesocket(s->listen_fd);
}
qemu_free(s);
+ qemu_chr_event(chr, CHR_EVENT_CLOSED);
}
static CharDriverState *qemu_chr_open_tcp(const char *host_str,