String's doc comment is useless. Replace its use in NetDevPasstOptions by identical types with hopefully useful documentation.
Signed-off-by: Markus Armbruster <[email protected]> Message-ID: <[email protected]> Reviewed-by: Marc-André Lureau <[email protected]> [One Since: fixed up] --- qapi/net.json | 43 +++++++++++++++++++++++++++++++++++++++---- net/passt.c | 8 ++++---- 2 files changed, 43 insertions(+), 8 deletions(-) diff --git a/qapi/net.json b/qapi/net.json index 8ed51b665c..c95aa909a0 100644 --- a/qapi/net.json +++ b/qapi/net.json @@ -114,6 +114,41 @@ 'data': { 'str': 'str' } } +## +# @PasstSearch: +# +# @str: DNS domain name suffix for host name lookup, or "none". See +# passt(1) option --search. +# +# Since: 10.1 +## +{ 'struct': 'PasstSearch', + 'data': { + 'str': 'str' } } + +## +# @PasstPortForward: +# +# @str: passt port forwarding specification, see passt(1) option +# --tcp-ports and --udp-ports. +# +# Since: 10.1 +## +{ 'struct': 'PasstPortForward', + 'data': { + 'str': 'str' } } + +## +# @PasstParameter: +# +# @str: Additional arguments for the passt executable, see passt(1) +# +# Since: 10.1 +## +{ 'struct': 'PasstParameter', + 'data': { + 'str': 'str' } } + ## # @NetdevPasstOptions: # @@ -206,7 +241,7 @@ '*outbound-if4': 'str', '*outbound-if6': 'str', '*dns': 'str', - '*search': ['String'], + '*search': ['PasstSearch'], '*fqdn': 'str', '*dhcp-dns': 'bool', '*dhcp-search': 'bool', @@ -224,9 +259,9 @@ '*freebind': 'bool', '*ipv4': 'bool', '*ipv6': 'bool', - '*tcp-ports': ['String'], - '*udp-ports': ['String'], - '*param': ['String'] }, + '*tcp-ports': ['PasstPortForward'], + '*udp-ports': ['PasstPortForward'], + '*param': ['PasstParameter'] }, 'if': 'CONFIG_PASST' } ## diff --git a/net/passt.c b/net/passt.c index 223ccd1a1c..45440c399b 100644 --- a/net/passt.c +++ b/net/passt.c @@ -637,7 +637,7 @@ static GPtrArray *net_passt_decode_args(const NetdevPasstOptions *passt, } if (passt->has_search && passt->search) { - const StringList *list = passt->search; + const PasstSearchList *list = passt->search; GString *domains = g_string_new(list->value->str); list = list->next; @@ -652,7 +652,7 @@ static GPtrArray *net_passt_decode_args(const NetdevPasstOptions *passt, } if (passt->has_tcp_ports && passt->tcp_ports) { - const StringList *list = passt->tcp_ports; + const PasstPortForwardList *list = passt->tcp_ports; GString *tcp_ports = g_string_new(list->value->str); list = list->next; @@ -667,7 +667,7 @@ static GPtrArray *net_passt_decode_args(const NetdevPasstOptions *passt, } if (passt->has_udp_ports && passt->udp_ports) { - const StringList *list = passt->udp_ports; + const PasstPortForwardList *list = passt->udp_ports; GString *udp_ports = g_string_new(list->value->str); list = list->next; @@ -682,7 +682,7 @@ static GPtrArray *net_passt_decode_args(const NetdevPasstOptions *passt, } if (passt->has_param && passt->param) { - const StringList *list = passt->param; + const PasstParameterList *list = passt->param; while (list) { g_ptr_array_add(args, g_strdup(list->value->str)); -- 2.54.0
