mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-01 06:43:53 -06:00
hmp: Use QAPI NetdevInfo in hmp_info_network
Replace usage of legacy field info_str of NetClientState for backend network devices with QAPI NetdevInfo stored_config that already used in QMP query-netdev. This change increases the detail of the "info network" output and takes a more general approach to composing the output. NIC and hubports still use legacy info_str field. Signed-off-by: Alexey Kirillov <lekiravi@yandex-team.ru> Signed-off-by: Jason Wang <jasowang@redhat.com>
This commit is contained in:
parent
59b5437eb7
commit
a0724776c5
4 changed files with 254 additions and 1 deletions
30
include/qapi/hmp-output-visitor.h
Normal file
30
include/qapi/hmp-output-visitor.h
Normal file
|
@ -0,0 +1,30 @@
|
|||
/*
|
||||
* HMP string output Visitor
|
||||
*
|
||||
* Copyright Yandex N.V., 2021
|
||||
*
|
||||
* This work is licensed under the terms of the GNU GPL, version 2 or later.
|
||||
* See the COPYING file in the top-level directory.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef HMP_OUTPUT_VISITOR_H
|
||||
#define HMP_OUTPUT_VISITOR_H
|
||||
|
||||
#include "qapi/visitor.h"
|
||||
|
||||
typedef struct HMPOutputVisitor HMPOutputVisitor;
|
||||
|
||||
/**
|
||||
* Create a HMP string output visitor for @obj
|
||||
*
|
||||
* Flattens dicts/structures, only shows arrays borders.
|
||||
*
|
||||
* Errors are not expected to happen.
|
||||
*
|
||||
* The caller is responsible for freeing the visitor with
|
||||
* visit_free().
|
||||
*/
|
||||
Visitor *hmp_output_visitor_new(char **result);
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue