aboutsummaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorWenchao Xia <wenchaoqemu@gmail.com>2014-06-18 08:43:30 +0200
committerLuiz Capitulino <lcapitulino@redhat.com>2014-06-23 11:01:25 -0400
commita589569f2f40a0454b52398035cfe7fbe44ab1e9 (patch)
tree4051a6ec079d736c41ea1ee07e903e0b9abf36a9 /util
parentf6dadb0242029e11640d9434efd39ec8211ea868 (diff)
qapi: adjust existing defines
In order to let event defines use existing types later, instead of redefine new ones, some old type defines for spice and vnc are changed, and BlockErrorAction is moved from block.h to qapi schema. Note that BlockErrorAction is not merged with BlockdevOnError. At this point, VncInfo is not made a child of VncBasicInfo, because VncBasicInfo has mandatory fields where VncInfo makes them optional. Signed-off-by: Wenchao Xia <wenchaoqemu@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Diffstat (limited to 'util')
-rw-r--r--util/qemu-sockets.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/util/qemu-sockets.c b/util/qemu-sockets.c
index a4a1e9d300..447720f62a 100644
--- a/util/qemu-sockets.c
+++ b/util/qemu-sockets.c
@@ -102,6 +102,16 @@ const char *inet_strfamily(int family)
return "unknown";
}
+NetworkAddressFamily inet_netfamily(int family)
+{
+ switch (family) {
+ case PF_INET6: return NETWORK_ADDRESS_FAMILY_IPV6;
+ case PF_INET: return NETWORK_ADDRESS_FAMILY_IPV4;
+ case PF_UNIX: return NETWORK_ADDRESS_FAMILY_UNIX;
+ }
+ return NETWORK_ADDRESS_FAMILY_UNKNOWN;
+}
+
int inet_listen_opts(QemuOpts *opts, int port_offset, Error **errp)
{
struct addrinfo ai,*res,*e;