提交 70f24fb6 编写于 作者: A Anthony Liguori

char: rename qemu_chr_close() -> qemu_chr_delete()

Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
上级 f69554b9
......@@ -2499,7 +2499,7 @@ void gdb_exit(CPUState *env, int code)
#ifndef CONFIG_USER_ONLY
if (s->chr) {
qemu_chr_close(s->chr);
qemu_chr_delete(s->chr);
}
#endif
}
......@@ -2785,7 +2785,7 @@ int gdbserver_start(const char *device)
monitor_init(mon_chr, 0);
} else {
if (s->chr)
qemu_chr_close(s->chr);
qemu_chr_delete(s->chr);
mon_chr = s->mon_chr;
memset(s, 0, sizeof(GDBState));
}
......
......@@ -198,7 +198,7 @@ static void ccid_card_vscard_handle_message(PassthruState *card,
static void ccid_card_vscard_drop_connection(PassthruState *card)
{
qemu_chr_close(card->cs);
qemu_chr_delete(card->cs);
card->vscard_in_pos = card->vscard_in_hdr = 0;
}
......
......@@ -428,7 +428,7 @@ static void usb_serial_handle_destroy(USBDevice *dev)
{
USBSerialState *s = (USBSerialState *)dev;
qemu_chr_close(s->cs);
qemu_chr_delete(s->cs);
}
static int usb_serial_can_read(void *opaque)
......
......@@ -2370,7 +2370,7 @@ QString *qemu_chr_mem_to_qs(CharDriverState *chr)
return qstring_from_substr((char *) d->outbuf, 0, d->outbuf_size - 1);
}
/* NOTE: this driver can not be closed with qemu_chr_close()! */
/* NOTE: this driver can not be closed with qemu_chr_delete()! */
void qemu_chr_close_mem(CharDriverState *chr)
{
MemoryDriver *d = chr->opaque;
......@@ -2646,7 +2646,7 @@ void qemu_chr_fe_close(struct CharDriverState *chr)
}
}
void qemu_chr_close(CharDriverState *chr)
void qemu_chr_delete(CharDriverState *chr)
{
QTAILQ_REMOVE(&chardevs, chr, next);
if (chr->chr_close)
......
......@@ -84,7 +84,7 @@ CharDriverState *qemu_chr_new(const char *label, const char *filename, void (*in
void qemu_chr_fe_set_echo(struct CharDriverState *chr, bool echo);
void qemu_chr_fe_open(struct CharDriverState *chr);
void qemu_chr_fe_close(struct CharDriverState *chr);
void qemu_chr_close(CharDriverState *chr);
void qemu_chr_delete(CharDriverState *chr);
void qemu_chr_fe_printf(CharDriverState *s, const char *fmt, ...)
GCC_FMT_ATTR(2, 3);
int qemu_chr_fe_write(CharDriverState *s, const uint8_t *buf, int len);
......
......@@ -837,7 +837,7 @@ static void usbredir_handle_destroy(USBDevice *udev)
{
USBRedirDevice *dev = DO_UPCAST(USBRedirDevice, dev, udev);
qemu_chr_close(dev->cs);
qemu_chr_delete(dev->cs);
/* Note must be done after qemu_chr_close, as that causes a close event */
qemu_bh_delete(dev->open_close_bh);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册