diff mbox series

[PULL,06/65] slirp: rename /extra/chardev

Message ID 20190114000326.29847-7-samuel.thibault@ens-lyon.org (mailing list archive)
State New, archived
Headers show
Series [PULL,01/65] slirp: associate slirp_output callback with the Slirp context | expand

Commit Message

Samuel Thibault Jan. 14, 2019, 12:02 a.m. UTC
From: Marc-André Lureau <marcandre.lureau@redhat.com>

Now it's only used for the chardev pointer.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
---
 slirp/slirp.c    | 4 ++--
 slirp/socket.h   | 2 +-
 slirp/tcp_subr.c | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)
diff mbox series

Patch

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));