[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
- [Qemu-devel] [PULLv2 00/65] slirp updates, Samuel Thibault, 2019/01/13
- [Qemu-devel] [PULL 03/65] slirp: replace ex_pty with ex_chardev, Samuel Thibault, 2019/01/13
- [Qemu-devel] [PULL 06/65] slirp: rename /extra/chardev,
Samuel Thibault <=
- [Qemu-devel] [PULL 10/65] slirp: replace the poor-man string split with g_strsplit(), Samuel Thibault, 2019/01/13
- [Qemu-devel] [PULL 17/65] slirp: remove FULL_BOLT, Samuel Thibault, 2019/01/13
- [Qemu-devel] [PULL 21/65] slirp: remove NO_UNIX_SOCKETS, Samuel Thibault, 2019/01/13
- [Qemu-devel] [PULL 18/65] slirp: remove the disabled readv()/writev() code path, Samuel Thibault, 2019/01/13
- [Qemu-devel] [PULL 01/65] slirp: associate slirp_output callback with the Slirp context, Samuel Thibault, 2019/01/13
- [Qemu-devel] [PULL 02/65] slirp: remove do_pty from fork_exec(), Samuel Thibault, 2019/01/13
- [Qemu-devel] [PULL 07/65] slirp: move internal function declarations, Samuel Thibault, 2019/01/13
- [Qemu-devel] [PULL 09/65] slirp: fix slirp_add_exec() leaks, Samuel Thibault, 2019/01/13
- [Qemu-devel] [PULL 05/65] slirp: remove unused EMU_RSH, Samuel Thibault, 2019/01/13
- [Qemu-devel] [PULL 11/65] slirp: remove dead declarations, Samuel Thibault, 2019/01/13