mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
qapi: convert netdev_add
This is not a full QAPI conversion, but an intermediate step. In essence, do_netdev_add() is split into three functions: 1. netdev_add(): performs the actual work. This function is fully converted to Error (thus, it's "qapi-friendly") 2. qmp_netdev_add(): the QMP front-end for netdev_add(). This is coded by hand and not auto-generated (gen=no in the schema). The reason for this it's a lot easier and simpler to with QemuOpts this way 3. hmp_netdev_add(): HMP front-end. This design was suggested by Paolo Bonzini. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Reviewed-By: Laszlo Ersek <lersek@redhat.com>
This commit is contained in:
parent
4559a1dbcc
commit
928059a37b
7 changed files with 78 additions and 19 deletions
3
net.h
3
net.h
|
@ -170,7 +170,8 @@ void net_check_clients(void);
|
|||
void net_cleanup(void);
|
||||
void net_host_device_add(Monitor *mon, const QDict *qdict);
|
||||
void net_host_device_remove(Monitor *mon, const QDict *qdict);
|
||||
int do_netdev_add(Monitor *mon, const QDict *qdict, QObject **ret_data);
|
||||
void netdev_add(QemuOpts *opts, Error **errp);
|
||||
int qmp_netdev_add(Monitor *mon, const QDict *qdict, QObject **ret);
|
||||
int do_netdev_del(Monitor *mon, const QDict *qdict, QObject **ret_data);
|
||||
|
||||
#define DEFAULT_NETWORK_SCRIPT "/etc/qemu-ifup"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue