qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PULL 06/65] slirp: rename /extra/chardev


From: Samuel Thibault
Subject: [Qemu-devel] [PULL 06/65] slirp: rename /extra/chardev
Date: Mon, 14 Jan 2019 01:02:27 +0100

From: Marc-André Lureau <address@hidden>

Now it's only used for the chardev pointer.

Signed-off-by: Marc-André Lureau <address@hidden>
Signed-off-by: Samuel Thibault <address@hidden>
---
 slirp/slirp.c    | 4 ++--
 slirp/socket.h   | 2 +-
 slirp/tcp_subr.c | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/slirp/slirp.c b/slirp/slirp.c
index fac7849195..ab08694e37 100644
--- a/slirp/slirp.c
+++ b/slirp/slirp.c
@@ -1088,10 +1088,10 @@ int slirp_add_exec(Slirp *slirp, void *chardev, const 
char *cmdline,
 
 ssize_t slirp_send(struct socket *so, const void *buf, size_t len, int flags)
 {
-    if (so->s == -1 && so->extra) {
+    if (so->s == -1 && so->chardev) {
         /* XXX this blocks entire thread. Rewrite to use
          * qemu_chr_fe_write and background I/O callbacks */
-        qemu_chr_fe_write_all(so->extra, buf, len);
+        qemu_chr_fe_write_all(so->chardev, buf, len);
         return len;
     }
 
diff --git a/slirp/socket.h b/slirp/socket.h
index 2f224bc34f..930ed95972 100644
--- a/slirp/socket.h
+++ b/slirp/socket.h
@@ -67,7 +67,7 @@ struct socket {
 
   struct sbuf so_rcv;          /* Receive buffer */
   struct sbuf so_snd;          /* Send buffer */
-  void * extra;                        /* Extra pointer */
+  void * chardev;
 };
 
 
diff --git a/slirp/tcp_subr.c b/slirp/tcp_subr.c
index fd7521854e..4b40850c7a 100644
--- a/slirp/tcp_subr.c
+++ b/slirp/tcp_subr.c
@@ -961,7 +961,7 @@ int tcp_ctl(struct socket *so)
                 so->so_faddr.s_addr == ex_ptr->ex_addr.s_addr) {
                 if (ex_ptr->ex_chardev) {
                     so->s = -1;
-                    so->extra = ex_ptr->ex_chardev;
+                    so->chardev = ex_ptr->ex_chardev;
                     return 1;
                 }
                 DEBUG_MISC((dfd, " executing %s\n", ex_ptr->ex_exec));
-- 
2.20.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]