aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Hajnoczi <stefanha@redhat.com>2013-03-27 10:10:43 +0100
committerLuiz Capitulino <lcapitulino@redhat.com>2013-04-02 11:47:37 -0400
commit1023104a7a9ac7aba0ac6f77760a946910b42edb (patch)
tree688d5d93bf827712ff74bfcb5731f881a988a539
parent513737b82a7fd9fcf49b82872ff75134746041e7 (diff)
downloadslirp-1023104a7a9ac7aba0ac6f77760a946910b42edb.zip
slirp-1023104a7a9ac7aba0ac6f77760a946910b42edb.tar.gz
slirp-1023104a7a9ac7aba0ac6f77760a946910b42edb.tar.bz2
oslib-posix: rename socket_set_nonblock() to qemu_set_nonblock()
The fcntl(fd, F_SETFL, O_NONBLOCK) flag is not specific to sockets. Rename to qemu_set_nonblock() just like qemu_set_cloexec(). Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
-rw-r--r--misc.c2
-rw-r--r--tcp_subr.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/misc.c b/misc.c
index 10c233f..a8d184d 100644
--- a/misc.c
+++ b/misc.c
@@ -210,7 +210,7 @@ int fork_exec(struct socket *so, const char *ex, int do_pty)
qemu_setsockopt(so->s, SOL_SOCKET, SO_REUSEADDR, &opt, sizeof(int));
opt = 1;
qemu_setsockopt(so->s, SOL_SOCKET, SO_OOBINLINE, &opt, sizeof(int));
- socket_set_nonblock(so->s);
+ qemu_set_nonblock(so->s);
/* Append the telnet options now */
if (so->so_m != NULL && do_pty == 1) {
diff --git a/tcp_subr.c b/tcp_subr.c
index 6881f1f..402b1c2 100644
--- a/tcp_subr.c
+++ b/tcp_subr.c
@@ -334,7 +334,7 @@ int tcp_fconnect(struct socket *so)
int opt, s = so->s;
struct sockaddr_in addr;
- socket_set_nonblock(s);
+ qemu_set_nonblock(s);
opt = 1;
qemu_setsockopt(s, SOL_SOCKET, SO_REUSEADDR, &opt, sizeof(opt));
opt = 1;
@@ -424,7 +424,7 @@ void tcp_connect(struct socket *inso)
tcp_close(sototcpcb(so)); /* This will sofree() as well */
return;
}
- socket_set_nonblock(s);
+ qemu_set_nonblock(s);
opt = 1;
qemu_setsockopt(s, SOL_SOCKET, SO_REUSEADDR, &opt, sizeof(int));
opt = 1;