diff options
author | Daniel P. Berrange <berrange@redhat.com> | 2017-12-21 12:55:20 +0000 |
---|---|---|
committer | Daniel P. Berrangé <berrange@redhat.com> | 2018-03-13 18:06:06 +0000 |
commit | 58dc31f1a7dc6cd0f21bd51a34011ba366d36e53 (patch) | |
tree | 9bd13cbc470c53428618096546c042590ebbdc2f /include | |
parent | abd983c0e0beb4b15326e51a837e1b5177df0e08 (diff) | |
download | qemu-58dc31f1a7dc6cd0f21bd51a34011ba366d36e53.zip qemu-58dc31f1a7dc6cd0f21bd51a34011ba366d36e53.tar.gz qemu-58dc31f1a7dc6cd0f21bd51a34011ba366d36e53.tar.bz2 |
sockets: move fd_is_socket() into common sockets code
The fd_is_socket() helper method is useful in a few places, so put it in
the common sockets code. Make the code more compact while moving it.
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/qemu/sockets.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/qemu/sockets.h b/include/qemu/sockets.h index e88d4c3..8140fea 100644 --- a/include/qemu/sockets.h +++ b/include/qemu/sockets.h @@ -12,6 +12,7 @@ int inet_aton(const char *cp, struct in_addr *ia); #include "qapi/qapi-types-sockets.h" /* misc helpers */ +bool fd_is_socket(int fd); int qemu_socket(int domain, int type, int protocol); int qemu_accept(int s, struct sockaddr *addr, socklen_t *addrlen); int socket_set_cork(int fd, int v); |