mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-01 23:03:54 -06:00
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>
This commit is contained in:
parent
f6dadb0242
commit
a589569f2f
16 changed files with 158 additions and 68 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue