aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2018-11-10 17:45:41 +0400
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2019-01-14 00:40:54 +0100
commitd3b9408c9bae23b5cbe3b42d29ad1927248cbdd5 (patch)
tree1252fd47be62032a7e4bc50a503ce559088e25b9
parent2d6cc3d0e77a0d5b4ba4df2cb0d3387881369cfb (diff)
slirp: rename /extra/chardev
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>
-rw-r--r--slirp/slirp.c4
-rw-r--r--slirp/socket.h2
-rw-r--r--slirp/tcp_subr.c2
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));