]> Git Repo - qemu.git/commitdiff
char: rename qemu_chr_write() -> qemu_chr_fe_write()
authorAnthony Liguori <[email protected]>
Mon, 15 Aug 2011 16:17:28 +0000 (11:17 -0500)
committerAnthony Liguori <[email protected]>
Mon, 22 Aug 2011 15:17:15 +0000 (10:17 -0500)
Signed-off-by: Anthony Liguori <[email protected]>
28 files changed:
gdbstub.c
hw/ccid-card-passthru.c
hw/debugcon.c
hw/escc.c
hw/etraxfs_ser.c
hw/grlib_apbuart.c
hw/lm32_juart.c
hw/lm32_uart.c
hw/mcf_uart.c
hw/milkymist-uart.c
hw/omap2.c
hw/parallel.c
hw/pl011.c
hw/pxa2xx.c
hw/serial.c
hw/sh_serial.c
hw/spapr_vty.c
hw/strongarm.c
hw/syborg_serial.c
hw/usb-serial.c
hw/virtio-console.c
hw/xen_console.c
hw/xilinx_uartlite.c
monitor.c
qemu-char.c
qemu-char.h
slirp/slirp.c
usb-redir.c

index 2f0206d1881dd487e9dd9bad379795bb6d656a0a..b0f57c17471e94d54a64c16a37de87bdecf4662c 100644 (file)
--- a/gdbstub.c
+++ b/gdbstub.c
@@ -382,7 +382,7 @@ static void put_buffer(GDBState *s, const uint8_t *buf, int len)
         }
     }
 #else
-    qemu_chr_write(s->chr, buf, len);
+    qemu_chr_fe_write(s->chr, buf, len);
 #endif
 }
 
index 28eb9d18f8c5366ed0efc281496571e22aca8cfb..082fd82cf9d2fa470fe938efede09317032c1d52 100644 (file)
@@ -72,8 +72,8 @@ static void ccid_card_vscard_send_msg(PassthruState *s,
     scr_msg_header.type = htonl(type);
     scr_msg_header.reader_id = htonl(reader_id);
     scr_msg_header.length = htonl(length);
-    qemu_chr_write(s->cs, (uint8_t *)&scr_msg_header, sizeof(VSCMsgHeader));
-    qemu_chr_write(s->cs, payload, length);
+    qemu_chr_fe_write(s->cs, (uint8_t *)&scr_msg_header, sizeof(VSCMsgHeader));
+    qemu_chr_fe_write(s->cs, payload, length);
 }
 
 static void ccid_card_vscard_send_apdu(PassthruState *s,
index 5ee6821206daff7f923a6c992c3464d700952ab8..c9ee6d90b096090112a98deac881fed5678f325e 100644 (file)
@@ -51,7 +51,7 @@ static void debugcon_ioport_write(void *opaque, uint32_t addr, uint32_t val)
     printf("debugcon: write addr=0x%04x val=0x%02x\n", addr, val);
 #endif
 
-    qemu_chr_write(s->chr, &ch, 1);
+    qemu_chr_fe_write(s->chr, &ch, 1);
 }
 
 
index 76d94f30fe63038cbb62b19e4435b60757b1768d..b2391b284ac9adf2e2dfcb321448898c68ba9ec6 100644 (file)
--- a/hw/escc.c
+++ b/hw/escc.c
@@ -551,7 +551,7 @@ static void escc_mem_write(void *opaque, target_phys_addr_t addr,
         s->tx = val;
         if (s->wregs[W_TXCTRL2] & TXCTRL2_TXEN) { // tx enabled
             if (s->chr)
-                qemu_chr_write(s->chr, &s->tx, 1);
+                qemu_chr_fe_write(s->chr, &s->tx, 1);
             else if (s->type == kbd && !s->disabled) {
                 handle_kbd_command(s, val);
             }
index 28b86ea2d4fbf15ab4d175710753277b939909b8..00360371e3c4a5170d660c58434c83106b973834 100644 (file)
@@ -119,7 +119,7 @@ ser_writel (void *opaque, target_phys_addr_t addr, uint32_t value)
     switch (addr)
     {
         case RW_DOUT:
-            qemu_chr_write(s->chr, &ch, 1);
+            qemu_chr_fe_write(s->chr, &ch, 1);
             s->regs[R_INTR] |= 3;
             s->pending_tx = 1;
             s->regs[addr] = value;
index 169a56eb1b4ecbd57a3d2261a6aa324d7b60bda3..c90b810413f419fcf25529c6b4038028c77c6197 100644 (file)
@@ -114,7 +114,7 @@ grlib_apbuart_writel(void *opaque, target_phys_addr_t addr, uint32_t value)
     switch (addr) {
     case DATA_OFFSET:
         c = value & 0xFF;
-        qemu_chr_write(uart->chr, &c, 1);
+        qemu_chr_fe_write(uart->chr, &c, 1);
         return;
 
     case STATUS_OFFSET:
index fddcf7ea146a624e53f0046b6134456cf7e56e92..5454aa4e4dd7db1fc18178a3ee3b8b2b56425a4e 100644 (file)
@@ -72,7 +72,7 @@ void lm32_juart_set_jtx(DeviceState *d, uint32_t jtx)
 
     s->jtx = jtx;
     if (s->chr) {
-        qemu_chr_write(s->chr, &ch, 1);
+        qemu_chr_fe_write(s->chr, &ch, 1);
     }
 }
 
index 09090e93b2108e32255d334cac81426c81e7c166..367854550c2c34ede67257a32491c7e49ab480b7 100644 (file)
@@ -169,7 +169,7 @@ static void uart_write(void *opaque, target_phys_addr_t addr, uint32_t value)
     switch (addr) {
     case R_RXTX:
         if (s->chr) {
-            qemu_chr_write(s->chr, &ch, 1);
+            qemu_chr_fe_write(s->chr, &ch, 1);
         }
         break;
     case R_IER:
index 6118ccb604c24c41e4d5bdc0776fc0e89638dfdc..e6b2ab067abff272c7b6fb6a22100f86e5514123 100644 (file)
@@ -110,7 +110,7 @@ static void mcf_uart_do_tx(mcf_uart_state *s)
 {
     if (s->tx_enabled && (s->sr & MCF_UART_TxEMP) == 0) {
         if (s->chr)
-            qemu_chr_write(s->chr, (unsigned char *)&s->tb, 1);
+            qemu_chr_fe_write(s->chr, (unsigned char *)&s->tb, 1);
         s->sr |= MCF_UART_TxEMP;
     }
     if (s->tx_enabled) {
index 56c90da0b646962253a4971761355821ac4d8ee1..e8e309de7cd0a0cea368df6488fd083649b47a0b 100644 (file)
@@ -77,7 +77,7 @@ static void uart_write(void *opaque, target_phys_addr_t addr, uint32_t value)
     switch (addr) {
     case R_RXTX:
         if (s->chr) {
-            qemu_chr_write(s->chr, &ch, 1);
+            qemu_chr_fe_write(s->chr, &ch, 1);
         }
         trace_milkymist_uart_pulse_irq_tx();
         qemu_irq_pulse(s->tx_irq);
index 3b51ac525f8e3907cbda9ac0f69a76f0c21411c2..e32cd94d2ca537f90f6e57a8c8202cedad5b3a15 100644 (file)
@@ -748,14 +748,14 @@ static void omap_sti_fifo_write(void *opaque, target_phys_addr_t addr,
 
     if (ch == STI_TRACE_CONTROL_CHANNEL) {
         /* Flush channel <i>value</i>.  */
-        qemu_chr_write(s->chr, (const uint8_t *) "\r", 1);
+        qemu_chr_fe_write(s->chr, (const uint8_t *) "\r", 1);
     } else if (ch == STI_TRACE_CONSOLE_CHANNEL || 1) {
         if (value == 0xc0 || value == 0xc3) {
             /* Open channel <i>ch</i>.  */
         } else if (value == 0x00)
-            qemu_chr_write(s->chr, (const uint8_t *) "\n", 1);
+            qemu_chr_fe_write(s->chr, (const uint8_t *) "\n", 1);
         else
-            qemu_chr_write(s->chr, &byte, 1);
+            qemu_chr_fe_write(s->chr, &byte, 1);
     }
 }
 
index 71f30ea1e8a0249a7bbd87580b0969b2b0b3ad9f..84feab895566c405e3c12047e73351c488920564 100644 (file)
@@ -120,7 +120,7 @@ parallel_ioport_write_sw(void *opaque, uint32_t addr, uint32_t val)
             if (val & PARA_CTR_STROBE) {
                 s->status &= ~PARA_STS_BUSY;
                 if ((s->control & PARA_CTR_STROBE) == 0)
-                    qemu_chr_write(s->chr, &s->dataw, 1);
+                    qemu_chr_fe_write(s->chr, &s->dataw, 1);
             } else {
                 if (s->control & PARA_CTR_INTEN) {
                     s->irq_pending = 1;
index 997ce848f860b7744aad149d96db4ef109715b25..707a161046e8d6be22e37823d059a401e18576e1 100644 (file)
@@ -133,7 +133,7 @@ static void pl011_write(void *opaque, target_phys_addr_t offset,
         /* ??? Check if transmitter is enabled.  */
         ch = value;
         if (s->chr)
-            qemu_chr_write(s->chr, &ch, 1);
+            qemu_chr_fe_write(s->chr, &ch, 1);
         s->int_level |= PL011_INT_TX;
         pl011_update(s);
         break;
index d00edc61770b7faf35703c86d319b717e3cf5f7e..2aa876001e8cea954e1e92ae1a722aeaff9ec2a7 100644 (file)
@@ -1923,7 +1923,7 @@ static void pxa2xx_fir_write(void *opaque, target_phys_addr_t addr,
         else
             ch = ~value;
         if (s->chr && s->enable && (s->control[0] & (1 << 3))) /* TXE */
-            qemu_chr_write(s->chr, &ch, 1);
+            qemu_chr_fe_write(s->chr, &ch, 1);
         break;
     case ICSR0:
         s->status[0] &= ~(value & 0x66);
index 222e356bedecc880c755b04954406741428ea63c..427eb4b045adc336c043b44f42553d990bdb6af9 100644 (file)
@@ -334,7 +334,7 @@ static void serial_xmit(void *opaque)
     if (s->mcr & UART_MCR_LOOP) {
         /* in loopback mode, say that we just received a char */
         serial_receive1(s, &s->tsr, 1);
-    } else if (qemu_chr_write(s->chr, &s->tsr, 1) != 1) {
+    } else if (qemu_chr_fe_write(s->chr, &s->tsr, 1) != 1) {
         if ((s->tsr_retry > 0) && (s->tsr_retry <= MAX_XMIT_RETRY)) {
             s->tsr_retry++;
             qemu_mod_timer(s->transmit_timer,  new_xmit_ts + s->char_transmit_time);
index 1767c97fccbc08dd5389aaac6ed4d326162d7588..a20c59ef77d36de91b8a58e4cfba7dfa35286e5e 100644 (file)
@@ -105,7 +105,7 @@ static void sh_serial_write(void *opaque, uint32_t offs, uint32_t val)
     case 0x0c: /* FTDR / TDR */
         if (s->chr) {
             ch = val;
-            qemu_chr_write(s->chr, &ch, 1);
+            qemu_chr_fe_write(s->chr, &ch, 1);
        }
        s->dr = val;
        s->flags &= ~SH_SERIAL_FLAG_TDE;
index 6fc0105eac2b5e0a23565c48649c85892faf4539..f5046d918303592c5fb46f1d127ee86a871a4be8 100644 (file)
@@ -50,8 +50,8 @@ void vty_putchars(VIOsPAPRDevice *sdev, uint8_t *buf, int len)
 {
     VIOsPAPRVTYDevice *dev = (VIOsPAPRVTYDevice *)sdev;
 
-    /* FIXME: should check the qemu_chr_write() return value */
-    qemu_chr_write(dev->chardev, buf, len);
+    /* FIXME: should check the qemu_chr_fe_write() return value */
+    qemu_chr_fe_write(dev->chardev, buf, len);
 }
 
 static int spapr_vty_init(VIOsPAPRDevice *sdev)
index 3a7fd6da8fd3d7d864343612540c452cf77a797f..84855cbb10f911ff776a666ff083b746539c0754 100644 (file)
@@ -1067,7 +1067,7 @@ static void strongarm_uart_tx(void *opaque)
     if (s->utcr3 & UTCR3_LBM) /* loopback */ {
         strongarm_uart_receive(s, &s->tx_fifo[s->tx_start], 1);
     } else if (s->chr) {
-        qemu_chr_write(s->chr, &s->tx_fifo[s->tx_start], 1);
+        qemu_chr_fe_write(s->chr, &s->tx_fifo[s->tx_start], 1);
     }
 
     s->tx_start = (s->tx_start + 1) % 8;
index 4d0ec04e3191fe7ae04aab20d621c23a3ea3d1d3..c83f82c36e70306024f360dfc063edb9e456d242 100644 (file)
@@ -119,7 +119,7 @@ static void do_dma_tx(SyborgSerialState *s, uint32_t count)
         /* optimize later. Now, 1 byte per iteration */
         while (count--) {
             cpu_physical_memory_read(s->dma_tx_ptr, &ch, 1);
-            qemu_chr_write(s->chr, &ch, 1);
+            qemu_chr_fe_write(s->chr, &ch, 1);
             s->dma_tx_ptr++;
         }
     } else {
@@ -203,7 +203,7 @@ static void syborg_serial_write(void *opaque, target_phys_addr_t offset,
     case SERIAL_DATA:
         ch = value;
         if (s->chr)
-            qemu_chr_write(s->chr, &ch, 1);
+            qemu_chr_fe_write(s->chr, &ch, 1);
         break;
     case SERIAL_INT_ENABLE:
         s->int_enable = value;
index bf2b775e83c7844d174a0020b8f1ed4a711ef716..8ed0fa6a3b40f3fe11b9c0fc914107e302be8156 100644 (file)
@@ -371,7 +371,7 @@ static int usb_serial_handle_data(USBDevice *dev, USBPacket *p)
             goto fail;
         for (i = 0; i < p->iov.niov; i++) {
             iov = p->iov.iov + i;
-            qemu_chr_write(s->cs, iov->iov_base, iov->iov_len);
+            qemu_chr_fe_write(s->cs, iov->iov_base, iov->iov_len);
         }
         break;
 
index fe5e188bf47a896e21b1a35b59e4b68853c9d71b..6c386fa46fefaf2eed323d55226dcd47ca5776a1 100644 (file)
@@ -27,7 +27,7 @@ static ssize_t flush_buf(VirtIOSerialPort *port, const uint8_t *buf, size_t len)
     VirtConsole *vcon = DO_UPCAST(VirtConsole, port, port);
     ssize_t ret;
 
-    ret = qemu_chr_write(vcon->chr, buf, len);
+    ret = qemu_chr_fe_write(vcon->chr, buf, len);
     trace_virtio_console_flush_buf(port->id, len, ret);
 
     if (ret < 0) {
index 99ff442f859a680badd0324668e8a3f5a0bec1ec..8468891614df145fd2186dcb5fd8a2f8d783364b 100644 (file)
@@ -156,7 +156,7 @@ static void xencons_send(struct XenConsole *con)
 
     size = con->buffer.size - con->buffer.consumed;
     if (con->chr)
-        len = qemu_chr_write(con->chr, con->buffer.data + con->buffer.consumed,
+        len = qemu_chr_fe_write(con->chr, con->buffer.data + con->buffer.consumed,
                              size);
     else
         len = size;
index 9b94e98fe3880fb5a94b472fb954182bd950ee01..467a26cc9eb2b452bfe0158d4150738d099c70b7 100644 (file)
@@ -129,7 +129,7 @@ uart_writel (void *opaque, target_phys_addr_t addr, uint32_t value)
 
         case R_TX:
             if (s->chr)
-                qemu_chr_write(s->chr, &ch, 1);
+                qemu_chr_fe_write(s->chr, &ch, 1);
 
             s->regs[addr] = value;
 
index 39791dc555ef586aa3c0a5dff6e06d613550746f..f95d959906950aba3e17979a1765c20d8102d1ac 100644 (file)
--- a/monitor.c
+++ b/monitor.c
@@ -247,7 +247,7 @@ static int monitor_read_password(Monitor *mon, ReadLineFunc *readline_func,
 void monitor_flush(Monitor *mon)
 {
     if (mon && mon->outbuf_index != 0 && !mon->mux_out) {
-        qemu_chr_write(mon->chr, mon->outbuf, mon->outbuf_index);
+        qemu_chr_fe_write(mon->chr, mon->outbuf, mon->outbuf_index);
         mon->outbuf_index = 0;
     }
 }
index 2358117bbe593a118c09e794b29dedadef362e76..bab43d8401cf9feaa399cde6f8fa9a3d2d6f0c87 100644 (file)
@@ -139,7 +139,7 @@ void qemu_chr_generic_open(CharDriverState *s)
     }
 }
 
-int qemu_chr_write(CharDriverState *s, const uint8_t *buf, int len)
+int qemu_chr_fe_write(CharDriverState *s, const uint8_t *buf, int len)
 {
     return s->chr_write(s, buf, len);
 }
@@ -185,7 +185,7 @@ void qemu_chr_printf(CharDriverState *s, const char *fmt, ...)
     va_list ap;
     va_start(ap, fmt);
     vsnprintf(buf, sizeof(buf), fmt, ap);
-    qemu_chr_write(s, (uint8_t *)buf, strlen(buf));
+    qemu_chr_fe_write(s, (uint8_t *)buf, strlen(buf));
     va_end(ap);
 }
 
index f361c6d281f13dec65d6aa23c7642cb26d1bc288..a4865fce85727825294e47e8f98e52f65b39ae0c 100644 (file)
@@ -87,7 +87,7 @@ void qemu_chr_guest_close(struct CharDriverState *chr);
 void qemu_chr_close(CharDriverState *chr);
 void qemu_chr_printf(CharDriverState *s, const char *fmt, ...)
     GCC_FMT_ATTR(2, 3);
-int qemu_chr_write(CharDriverState *s, const uint8_t *buf, int len);
+int qemu_chr_fe_write(CharDriverState *s, const uint8_t *buf, int len);
 void qemu_chr_send_event(CharDriverState *s, int event);
 void qemu_chr_add_handlers(CharDriverState *s,
                            IOCanReadHandler *fd_can_read,
index 655b3f40c87dc26beda943966586d8477e80a5b2..19d69eb623c29f7042ef55c84311d8bcac7cd74a 100644 (file)
@@ -818,7 +818,7 @@ int slirp_add_exec(Slirp *slirp, int do_pty, const void *args,
 ssize_t slirp_send(struct socket *so, const void *buf, size_t len, int flags)
 {
        if (so->s == -1 && so->extra) {
-               qemu_chr_write(so->extra, buf, len);
+               qemu_chr_fe_write(so->extra, buf, len);
                return len;
        }
 
index 3fbbcfff97a5a9d9510a01d7f60919e29801f9f0..84fa020b05e13cd86e3715b76d02e0a459dc7788 100644 (file)
@@ -225,7 +225,7 @@ static int usbredir_write(void *priv, uint8_t *data, int count)
 {
     USBRedirDevice *dev = priv;
 
-    return qemu_chr_write(dev->cs, data, count);
+    return qemu_chr_fe_write(dev->cs, data, count);
 }
 
 /*
This page took 0.059121 seconds and 4 git commands to generate.