From 58dc31f1a7dc6cd0f21bd51a34011ba366d36e53 Mon Sep 17 00:00:00 2001 From: Daniel P. Berrange Date: Thu, 21 Dec 2017 12:55:20 +0000 Subject: 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 Reviewed-by: Marc-André Lureau Signed-off-by: Daniel P. Berrange --- include/qemu/sockets.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/qemu/sockets.h') diff --git a/include/qemu/sockets.h b/include/qemu/sockets.h index e88d4c37ab..8140fea685 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); -- cgit v1.2.3-55-g7522