aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2017-04-26 09:36:42 +0200
committerMarkus Armbruster <armbru@redhat.com>2017-05-09 09:14:40 +0200
commit0c099fa7e9248a97c7854e5af84fc2479477ed5d (patch)
tree45514616cfe466d925ea151b8348387679f822f3
parentbd269ebc82fbaa5fe7ce5bc7c1770ac8acecd884 (diff)
downloadqemu-0c099fa7e9248a97c7854e5af84fc2479477ed5d.zip
qemu-0c099fa7e9248a97c7854e5af84fc2479477ed5d.tar.gz
qemu-0c099fa7e9248a97c7854e5af84fc2479477ed5d.tar.bz2
sockets: Delete unused helper socket_address_crumple()
Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <1493192202-3184-8-git-send-email-armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> [Commit message typo fixed]
-rw-r--r--include/qemu/sockets.h11
-rw-r--r--util/qemu-sockets.c31
2 files changed, 0 insertions, 42 deletions
diff --git a/include/qemu/sockets.h b/include/qemu/sockets.h
index a0b5cae..5c326db 100644
--- a/include/qemu/sockets.h
+++ b/include/qemu/sockets.h
@@ -121,17 +121,6 @@ SocketAddress *socket_remote_address(int fd, Error **errp);
char *socket_address_to_string(struct SocketAddress *addr, Error **errp);
/**
- * socket_address_crumple:
- * @addr_flat: the socket address to crumple
- *
- * Convert SocketAddress to SocketAddressLegacy. Caller is responsible
- * for freeing with qapi_free_SocketAddressLegacy().
- *
- * Returns: the argument converted to SocketAddressLegacy.
- */
-SocketAddressLegacy *socket_address_crumple(SocketAddress *addr);
-
-/**
* socket_address_flatten:
* @addr: the socket address to flatten
*
diff --git a/util/qemu-sockets.c b/util/qemu-sockets.c
index 9e65ebe..d8183f7 100644
--- a/util/qemu-sockets.c
+++ b/util/qemu-sockets.c
@@ -1336,37 +1336,6 @@ char *socket_address_to_string(struct SocketAddress *addr, Error **errp)
return buf;
}
-SocketAddressLegacy *socket_address_crumple(SocketAddress *addr_flat)
-{
- SocketAddressLegacy *addr = g_new(SocketAddressLegacy, 1);
-
- switch (addr_flat->type) {
- case SOCKET_ADDRESS_TYPE_INET:
- addr->type = SOCKET_ADDRESS_LEGACY_KIND_INET;
- addr->u.inet.data = QAPI_CLONE(InetSocketAddress,
- &addr_flat->u.inet);
- break;
- case SOCKET_ADDRESS_TYPE_UNIX:
- addr->type = SOCKET_ADDRESS_LEGACY_KIND_UNIX;
- addr->u.q_unix.data = QAPI_CLONE(UnixSocketAddress,
- &addr_flat->u.q_unix);
- break;
- case SOCKET_ADDRESS_TYPE_VSOCK:
- addr->type = SOCKET_ADDRESS_LEGACY_KIND_VSOCK;
- addr->u.vsock.data = QAPI_CLONE(VsockSocketAddress,
- &addr_flat->u.vsock);
- break;
- case SOCKET_ADDRESS_TYPE_FD:
- addr->type = SOCKET_ADDRESS_LEGACY_KIND_FD;
- addr->u.fd.data = QAPI_CLONE(String, &addr_flat->u.fd);
- break;
- default:
- abort();
- }
-
- return addr;
-}
-
SocketAddress *socket_address_flatten(SocketAddressLegacy *addr_legacy)
{
SocketAddress *addr = g_new(SocketAddress, 1);