Patchwork [11/14] char: rename qemu_chr_close() -> qemu_chr_delete()

login
register
mail settings
Submitter Anthony Liguori
Date Aug. 15, 2011, 4:17 p.m.
Message ID <1313425061-12854-12-git-send-email-aliguori@us.ibm.com>
Download mbox | patch
Permalink /patch/110080/
State New
Headers show

Comments

Anthony Liguori - Aug. 15, 2011, 4:17 p.m.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
---
 gdbstub.c               |    4 ++--
 hw/ccid-card-passthru.c |    2 +-
 hw/usb-serial.c         |    2 +-
 qemu-char.c             |    4 ++--
 qemu-char.h             |    2 +-
 usb-redir.c             |    2 +-
 6 files changed, 8 insertions(+), 8 deletions(-)

Patch

diff --git a/gdbstub.c b/gdbstub.c
index f99f87f..ba793b9 100644
--- a/gdbstub.c
+++ b/gdbstub.c
@@ -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));
     }
diff --git a/hw/ccid-card-passthru.c b/hw/ccid-card-passthru.c
index 082fd82..2cbc81b 100644
--- a/hw/ccid-card-passthru.c
+++ b/hw/ccid-card-passthru.c
@@ -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;
 }
 
diff --git a/hw/usb-serial.c b/hw/usb-serial.c
index 0637ee9..7dbf6df 100644
--- a/hw/usb-serial.c
+++ b/hw/usb-serial.c
@@ -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)
diff --git a/qemu-char.c b/qemu-char.c
index 75fe7b3..70349fd 100644
--- a/qemu-char.c
+++ b/qemu-char.c
@@ -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)
diff --git a/qemu-char.h b/qemu-char.h
index f90b85c..555b5f1 100644
--- a/qemu-char.h
+++ b/qemu-char.h
@@ -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);
diff --git a/usb-redir.c b/usb-redir.c
index 9916dea..f47e568 100644
--- a/usb-redir.c
+++ b/usb-redir.c
@@ -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);