mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 00:33:55 -06:00
monitor: Convert do_set_link() to QObject, QError
Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
This commit is contained in:
parent
c9b26a4cbe
commit
5369e3c0b8
3 changed files with 7 additions and 5 deletions
7
net.c
7
net.c
|
@ -1271,7 +1271,7 @@ void do_info_network(Monitor *mon)
|
|||
}
|
||||
}
|
||||
|
||||
void do_set_link(Monitor *mon, const QDict *qdict)
|
||||
int do_set_link(Monitor *mon, const QDict *qdict, QObject **ret_data)
|
||||
{
|
||||
VLANState *vlan;
|
||||
VLANClientState *vc = NULL;
|
||||
|
@ -1289,8 +1289,8 @@ void do_set_link(Monitor *mon, const QDict *qdict)
|
|||
done:
|
||||
|
||||
if (!vc) {
|
||||
monitor_printf(mon, "could not find network device '%s'\n", name);
|
||||
return;
|
||||
qerror_report(QERR_DEVICE_NOT_FOUND, name);
|
||||
return -1;
|
||||
}
|
||||
|
||||
vc->link_down = !up;
|
||||
|
@ -1298,6 +1298,7 @@ done:
|
|||
if (vc->info->link_status_changed) {
|
||||
vc->info->link_status_changed(vc);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void net_cleanup(void)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue