aboutsummaryrefslogtreecommitdiff
path: root/qemu-char.c
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
commitf9e8cacc5557e4372401da74141f833fcacda038 (patch)
tree59218a3c4167dd06d03a7a42388810efb3049c0d /qemu-char.c
parent5d45de9796539f95eb6b1201588362981f8cb2d4 (diff)
downloadqemu-f9e8cacc5557e4372401da74141f833fcacda038.zip
qemu-f9e8cacc5557e4372401da74141f833fcacda038.tar.gz
qemu-f9e8cacc5557e4372401da74141f833fcacda038.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>
Diffstat (limited to 'qemu-char.c')
-rw-r--r--qemu-char.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/qemu-char.c b/qemu-char.c
index dee623e..4d8c6ca 100644
--- a/qemu-char.c
+++ b/qemu-char.c
@@ -2570,7 +2570,7 @@ static int tcp_chr_add_client(CharDriverState *chr, int fd)
if (s->fd != -1)
return -1;
- socket_set_nonblock(fd);
+ qemu_set_nonblock(fd);
if (s->do_nodelay)
socket_set_nodelay(fd);
s->fd = fd;
@@ -2722,7 +2722,7 @@ static CharDriverState *qemu_chr_open_socket_fd(int fd, bool do_nodelay,
printf("QEMU waiting for connection on: %s\n",
chr->filename);
tcp_chr_accept(s->listen_chan, G_IO_IN, chr);
- socket_set_nonblock(s->listen_fd);
+ qemu_set_nonblock(s->listen_fd);
}
return chr;
}
@@ -2764,7 +2764,7 @@ static CharDriverState *qemu_chr_open_socket(QemuOpts *opts)
}
if (!is_waitconnect)
- socket_set_nonblock(fd);
+ qemu_set_nonblock(fd);
chr = qemu_chr_open_socket_fd(fd, do_nodelay, is_listen, is_telnet,
is_waitconnect, &local_err);
@@ -3653,7 +3653,7 @@ static CharDriverState *qmp_chardev_open_serial(ChardevHostdev *serial,
if (error_is_set(errp)) {
return NULL;
}
- socket_set_nonblock(fd);
+ qemu_set_nonblock(fd);
return qemu_chr_open_tty_fd(fd);
#else
error_setg(errp, "character device backend type 'serial' not supported");