]> git.proxmox.com Git - mirror_qemu.git/commitdiff
char: rename some frontend functions
authorMarc-André Lureau <marcandre.lureau@redhat.com>
Sat, 22 Oct 2016 09:52:53 +0000 (12:52 +0300)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 24 Oct 2016 13:27:20 +0000 (15:27 +0200)
qemu_chr_accept_input() and qemu_chr_disconnect() are only used by
frontend, so use qemu_chr_fe prefix.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20161022095318.17775-14-marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
18 files changed:
hw/char/bcm2835_aux.c
hw/char/cadence_uart.c
hw/char/escc.c
hw/char/imx_serial.c
hw/char/ipoctal232.c
hw/char/lm32_uart.c
hw/char/mcf_uart.c
hw/char/milkymist-uart.c
hw/char/pl011.c
hw/char/serial.c
hw/char/spapr_vty.c
hw/char/stm32f2xx_usart.c
hw/char/virtio-console.c
hw/char/xilinx_uartlite.c
include/sysemu/char.h
net/vhost-user.c
qemu-char.c
tests/vhost-user-test.c

index 4bc5d021354500097af9e034f6fc49982a0caa0f..30f4ea546bfd97bd7e38b1171e7128f2195e9aab 100644 (file)
@@ -80,7 +80,7 @@ static uint64_t bcm2835_aux_read(void *opaque, hwaddr offset, unsigned size)
             }
         }
         if (s->chr.chr) {
-            qemu_chr_accept_input(s->chr.chr);
+            qemu_chr_fe_accept_input(s->chr.chr);
         }
         bcm2835_aux_update(s);
         return c;
index d5687dd61fec056390d6b8fd48d429c8aa6b1b1a..c02723502c31052e47bab66b2be1f2842323a4f9 100644 (file)
@@ -143,7 +143,7 @@ static void uart_rx_reset(CadenceUARTState *s)
     s->rx_wpos = 0;
     s->rx_count = 0;
     if (s->chr.chr) {
-        qemu_chr_accept_input(s->chr.chr);
+        qemu_chr_fe_accept_input(s->chr.chr);
     }
 }
 
@@ -369,7 +369,7 @@ static void uart_read_rx_fifo(CadenceUARTState *s, uint32_t *c)
         s->rx_count--;
 
         if (s->chr.chr) {
-            qemu_chr_accept_input(s->chr.chr);
+            qemu_chr_fe_accept_input(s->chr.chr);
         }
     } else {
         *c = 0;
index ae69b392a4eb5c453c8da267a4d5c3fe037e395d..f1e8fac6f358f8fcd8107589cea9d0c1aee913a6 100644 (file)
@@ -600,7 +600,7 @@ static uint64_t escc_mem_read(void *opaque, hwaddr addr,
             ret = s->rx;
         trace_escc_mem_readb_data(CHN_C(s), ret);
         if (s->chr.chr) {
-            qemu_chr_accept_input(s->chr.chr);
+            qemu_chr_fe_accept_input(s->chr.chr);
         }
         return ret;
     default:
index 5c11de2cbed8d181537a7f2f38a1e44b16b0ba6c..2e39d319feb480c29ea270eeba31ed4e48bea1ec 100644 (file)
@@ -122,7 +122,7 @@ static uint64_t imx_serial_read(void *opaque, hwaddr offset,
             s->uts1 |= UTS1_RXEMPTY;
             imx_update(s);
             if (s->chr.chr) {
-                qemu_chr_accept_input(s->chr.chr);
+                qemu_chr_fe_accept_input(s->chr.chr);
             }
         }
         return c;
@@ -216,7 +216,7 @@ static void imx_serial_write(void *opaque, hwaddr offset,
         if (value & UCR2_RXEN) {
             if (!(s->ucr2 & UCR2_RXEN)) {
                 if (s->chr.chr) {
-                    qemu_chr_accept_input(s->chr.chr);
+                    qemu_chr_fe_accept_input(s->chr.chr);
                 }
             }
         }
index 0c9dea322e649830970f142ca5deb7574cee544b..875fe3b22a24165948b691902d2a9a7039c3dfb9 100644 (file)
@@ -289,7 +289,7 @@ static uint16_t io_read(IPackDevice *ip, uint8_t addr)
                 ch->sr &= ~SR_RXRDY;
                 blk->isr &= ~ISR_RXRDY(channel);
                 if (ch->dev.chr) {
-                    qemu_chr_accept_input(ch->dev.chr);
+                    qemu_chr_fe_accept_input(ch->dev.chr);
                 }
             } else {
                 ch->rhr_idx = (ch->rhr_idx + 1) % RX_FIFO_SIZE;
index 72fc41c90f32be83d95377abf231faaee92e95e4..a8d4a2db70ee8fe7330a9ff791f23ede6b480bdd 100644 (file)
@@ -142,7 +142,7 @@ static uint64_t uart_read(void *opaque, hwaddr addr,
         r = s->regs[R_RXTX];
         s->regs[R_LSR] &= ~LSR_DR;
         uart_update_irq(s);
-        qemu_chr_accept_input(s->chr.chr);
+        qemu_chr_fe_accept_input(s->chr.chr);
         break;
     case R_IIR:
     case R_LSR:
index 436e1b0228c16846341e62e8ab216e58ff6eee6f..57b47c66905f183893d9a24981585a3a59f6719f 100644 (file)
@@ -93,7 +93,7 @@ uint64_t mcf_uart_read(void *opaque, hwaddr addr,
             if (s->fifo_len == 0)
                 s->sr &= ~MCF_UART_RxRDY;
             mcf_uart_update(s);
-            qemu_chr_accept_input(s->chr.chr);
+            qemu_chr_fe_accept_input(s->chr.chr);
             return val;
         }
     case 0x10:
index a6518e62b009397082573abbc852d07c0495db3d..c75bcb57fd2243786605dd94e565e05006c6f5ba 100644 (file)
@@ -138,7 +138,7 @@ static void uart_write(void *opaque, hwaddr addr, uint64_t value,
     case R_STAT:
         /* write one to clear bits */
         s->regs[addr] &= ~(value & (STAT_RX_EVT | STAT_TX_EVT));
-        qemu_chr_accept_input(s->chr.chr);
+        qemu_chr_fe_accept_input(s->chr.chr);
         break;
 
     default:
index 9645195f906c571198e9ceac7f124139b88c54e1..29fb7251a195f0efdd293627e4d053cf300d469d 100644 (file)
@@ -88,7 +88,7 @@ static uint64_t pl011_read(void *opaque, hwaddr offset,
         s->rsr = c >> 8;
         pl011_update(s);
         if (s->chr.chr) {
-            qemu_chr_accept_input(s->chr.chr);
+            qemu_chr_fe_accept_input(s->chr.chr);
         }
         r = c;
         break;
index 18c748231c28037d751faabca5c2f91adc9379c3..4489bf168f858b71dd9261cafc90a410d6925f5c 100644 (file)
@@ -490,7 +490,7 @@ static uint64_t serial_ioport_read(void *opaque, hwaddr addr, unsigned size)
             serial_update_irq(s);
             if (!(s->mcr & UART_MCR_LOOP)) {
                 /* in loopback mode, don't receive any data */
-                qemu_chr_accept_input(s->chr.chr);
+                qemu_chr_fe_accept_input(s->chr.chr);
             }
         }
         break;
index dcb4a85d97feacc216220ae99a01108f02748352..7afc6a5094e9c33e71c893129f59d69a281d9fcd 100644 (file)
@@ -51,7 +51,7 @@ static int vty_getchars(VIOsPAPRDevice *sdev, uint8_t *buf, int max)
         buf[n++] = dev->buf[dev->out++ % VTERM_BUFSIZE];
     }
 
-    qemu_chr_accept_input(dev->chardev.chr);
+    qemu_chr_fe_accept_input(dev->chardev.chr);
 
     return n;
 }
index 8cc27372f067ffc73a671cd16daf45359a091b32..8619d10e04096a5db8e71cef810045c1182cadcc 100644 (file)
@@ -98,7 +98,7 @@ static uint64_t stm32f2xx_usart_read(void *opaque, hwaddr addr,
         retvalue = s->usart_sr;
         s->usart_sr &= ~USART_SR_TC;
         if (s->chr.chr) {
-            qemu_chr_accept_input(s->chr.chr);
+            qemu_chr_fe_accept_input(s->chr.chr);
         }
         return retvalue;
     case USART_DR:
@@ -106,7 +106,7 @@ static uint64_t stm32f2xx_usart_read(void *opaque, hwaddr addr,
         s->usart_sr |= USART_SR_TXE;
         s->usart_sr &= ~USART_SR_RXNE;
         if (s->chr.chr) {
-            qemu_chr_accept_input(s->chr.chr);
+            qemu_chr_fe_accept_input(s->chr.chr);
         }
         qemu_set_irq(s->irq, 0);
         return s->usart_dr & 0x3FF;
index a4730baafbf35351ecb85fcef4ae019834887506..93acbeccf414affc414dd0719629e9942f759ba2 100644 (file)
@@ -123,7 +123,7 @@ static void guest_writable(VirtIOSerialPort *port)
     VirtConsole *vcon = VIRTIO_CONSOLE(port);
 
     if (vcon->chr.chr) {
-        qemu_chr_accept_input(vcon->chr.chr);
+        qemu_chr_fe_accept_input(vcon->chr.chr);
     }
 }
 
index 0e809d52fece351c7a5c5f9c4fb1ce23d603f384..185c63baf34f0a81b9775462eb89071e306270d2 100644 (file)
@@ -107,7 +107,7 @@ uart_read(void *opaque, hwaddr addr, unsigned int size)
                 s->rx_fifo_len--;
             uart_update_status(s);
             uart_update_irq(s);
-            qemu_chr_accept_input(s->chr.chr);
+            qemu_chr_fe_accept_input(s->chr.chr);
             break;
 
         default:
index c518c2ff01e3eb7bbeacb527304f853f6d8d1f37..5881094f5265d7deda2f57968d3a21f0a3544e4f 100644 (file)
@@ -165,11 +165,11 @@ CharDriverState *qemu_chr_new(const char *label, const char *filename);
 
 
 /**
- * @qemu_chr_disconnect:
+ * @qemu_chr_fe_disconnect:
  *
  * Close a fd accpeted by character backend.
  */
-void qemu_chr_disconnect(CharDriverState *chr);
+void qemu_chr_fe_disconnect(CharDriverState *chr);
 
 /**
  * @qemu_chr_cleanup:
@@ -490,7 +490,7 @@ void qemu_chr_add_handlers_full(CharDriverState *s,
                                 GMainContext *context);
 
 void qemu_chr_be_generic_open(CharDriverState *s);
-void qemu_chr_accept_input(CharDriverState *s);
+void qemu_chr_fe_accept_input(CharDriverState *s);
 int qemu_chr_add_client(CharDriverState *s, int fd);
 CharDriverState *qemu_chr_find(const char *name);
 bool chr_is_ringbuf(const CharDriverState *chr);
index 957459f49328126e6700d28d1a2c862040215ad2..45782470e85b204832af7cbf0f1e125aeced9568 100644 (file)
@@ -187,7 +187,7 @@ static gboolean net_vhost_user_watch(GIOChannel *chan, GIOCondition cond,
 {
     VhostUserState *s = opaque;
 
-    qemu_chr_disconnect(s->chr.chr);
+    qemu_chr_fe_disconnect(s->chr.chr);
 
     return FALSE;
 }
@@ -212,7 +212,7 @@ static void net_vhost_user_event(void *opaque, int event)
         s->watch = qemu_chr_fe_add_watch(s->chr.chr, G_IO_HUP,
                                          net_vhost_user_watch, s);
         if (vhost_user_start(queues, ncs) < 0) {
-            qemu_chr_disconnect(s->chr.chr);
+            qemu_chr_fe_disconnect(s->chr.chr);
             return;
         }
         qmp_set_link(name, true, &err);
index 9eefa7f42c235cf9e536b7f491927730be9abd31..2c2683925629bd3c0a80677ee2fcaa7f62f70327 100644 (file)
@@ -430,7 +430,7 @@ int qemu_chr_add_client(CharDriverState *s, int fd)
     return s->chr_add_client ? s->chr_add_client(s, fd) : -1;
 }
 
-void qemu_chr_accept_input(CharDriverState *s)
+void qemu_chr_fe_accept_input(CharDriverState *s)
 {
     if (s->chr_accept_input)
         s->chr_accept_input(s);
@@ -4225,7 +4225,7 @@ void qemu_chr_fe_release(CharDriverState *s)
     s->avail_connections++;
 }
 
-void qemu_chr_disconnect(CharDriverState *chr)
+void qemu_chr_fe_disconnect(CharDriverState *chr)
 {
     if (chr->chr_disconnect) {
         chr->chr_disconnect(chr);
index 52fbc0386f46da044009fb46165263fdf8dc12ab..6e5383d8c22d5aca1e9530e0ddbf8b8482054352 100644 (file)
@@ -268,7 +268,7 @@ static void chr_read(void *opaque, const uint8_t *buf, int size)
     int fd;
 
     if (s->test_fail) {
-        qemu_chr_disconnect(chr->chr);
+        qemu_chr_fe_disconnect(chr->chr);
         /* now switch to non-failure */
         s->test_fail = false;
     }
@@ -313,7 +313,7 @@ static void chr_read(void *opaque, const uint8_t *buf, int size)
        g_assert_cmpint(msg.payload.u64 & (0x1ULL << VHOST_USER_F_PROTOCOL_FEATURES),
                        !=, 0ULL);
         if (s->test_flags == TEST_FLAGS_DISCONNECT) {
-            qemu_chr_disconnect(chr->chr);
+            qemu_chr_fe_disconnect(chr->chr);
             s->test_flags = TEST_FLAGS_BAD;
         }
         break;
@@ -724,7 +724,7 @@ reconnect_cb(gpointer user_data)
 {
     TestServer *s = user_data;
 
-    qemu_chr_disconnect(s->chr.chr);
+    qemu_chr_fe_disconnect(s->chr.chr);
 
     return FALSE;
 }