diff options
author | Jason Wang <jasowang@redhat.com> | 2021-04-02 11:05:20 +0800 |
---|---|---|
committer | Jason Wang <jasowang@redhat.com> | 2021-04-08 17:33:59 +0800 |
commit | f9bb0c1f9862dc959ba84977620fc8267623463e (patch) | |
tree | e709382573ed7ee7851d8e53cd0e318206b34692 /net/net.c | |
parent | 22317309df52d165c02a20bddfdd710c8deed583 (diff) |
Revert "qapi: net: Add query-netdev command"
Several issues has been reported for query-netdev series. Consider
it's late in the rc, this reverts commit
d32ad10a14d46dfe9304e3ed5858a11dcd5c71a0.
Signed-off-by: Jason Wang <jasowang@redhat.com>
Diffstat (limited to 'net/net.c')
-rw-r--r-- | net/net.c | 30 |
1 files changed, 1 insertions, 29 deletions
@@ -36,6 +36,7 @@ #include "monitor/monitor.h" #include "qemu/help_option.h" #include "qapi/qapi-commands-net.h" +#include "qapi/qapi-visit-net.h" #include "qapi/qmp/qdict.h" #include "qapi/qmp/qerror.h" #include "qemu/error-report.h" @@ -352,7 +353,6 @@ static void qemu_free_net_client(NetClientState *nc) } g_free(nc->name); g_free(nc->model); - qapi_free_NetdevInfo(nc->stored_config); if (nc->destructor) { nc->destructor(nc); } @@ -1289,34 +1289,6 @@ RxFilterInfoList *qmp_query_rx_filter(bool has_name, const char *name, return filter_list; } -NetdevInfoList *qmp_query_netdev(Error **errp) -{ - NetdevInfoList *list = NULL; - NetClientState *nc; - - QTAILQ_FOREACH(nc, &net_clients, next) { - /* - * Only look at netdevs (backend network devices), not for each queue - * or NIC / hubport - */ - if (nc->stored_config) { - NetdevInfo *element = QAPI_CLONE(NetdevInfo, nc->stored_config); - - g_free(element->id); /* Need to dealloc empty id after clone */ - element->id = g_strdup(nc->name); - - element->has_peer_id = nc->peer != NULL; - if (element->has_peer_id) { - element->peer_id = g_strdup(nc->peer->name); - } - - QAPI_LIST_PREPEND(list, element); - } - } - - return list; -} - void hmp_info_network(Monitor *mon, const QDict *qdict) { NetClientState *nc, *peer; |