aboutsummaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorMao Zhongyi <maozy.fnst@cn.fujitsu.com>2017-06-08 11:11:24 +0800
committerMichael Tokarev <mjt@tls.msk.ru>2017-07-11 11:18:37 +0300
commit3bcf7d7df552c8bd4fdfe70b753f45169407cacb (patch)
tree2501f9650cbad61c30adba1d88b1d7003cd38018 /util
parentaa5a2c0b3dff907017388895d3005bd348cca6c4 (diff)
util/qemu-sockets: Drop unused helper socket_address_to_string()
Signed-off-by: Mao Zhongyi <maozy.fnst@cn.fujitsu.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Diffstat (limited to 'util')
-rw-r--r--util/qemu-sockets.c34
1 files changed, 0 insertions, 34 deletions
diff --git a/util/qemu-sockets.c b/util/qemu-sockets.c
index d3e51089de..55b6c17f5f 100644
--- a/util/qemu-sockets.c
+++ b/util/qemu-sockets.c
@@ -1325,40 +1325,6 @@ SocketAddress *socket_remote_address(int fd, Error **errp)
return socket_sockaddr_to_address(&ss, sslen, errp);
}
-char *socket_address_to_string(struct SocketAddress *addr, Error **errp)
-{
- char *buf;
- InetSocketAddress *inet;
-
- switch (addr->type) {
- case SOCKET_ADDRESS_TYPE_INET:
- inet = &addr->u.inet;
- if (strchr(inet->host, ':') == NULL) {
- buf = g_strdup_printf("%s:%s", inet->host, inet->port);
- } else {
- buf = g_strdup_printf("[%s]:%s", inet->host, inet->port);
- }
- break;
-
- case SOCKET_ADDRESS_TYPE_UNIX:
- buf = g_strdup(addr->u.q_unix.path);
- break;
-
- case SOCKET_ADDRESS_TYPE_FD:
- buf = g_strdup(addr->u.fd.str);
- break;
-
- case SOCKET_ADDRESS_TYPE_VSOCK:
- buf = g_strdup_printf("%s:%s",
- addr->u.vsock.cid,
- addr->u.vsock.port);
- break;
-
- default:
- abort();
- }
- return buf;
-}
SocketAddress *socket_address_flatten(SocketAddressLegacy *addr_legacy)
{