summaryrefslogtreecommitdiff
path: root/net.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2010-03-26 09:07:11 +0100
committerAurelien Jarno <aurelien@aurel32.net>2010-04-18 23:55:19 +0200
commit5369e3c0b8997210a2558191d8451775f7643683 (patch)
tree47e8a4360fa1bd2e00fdb8469529cdd9e4d6cddf /net.c
parentc9b26a4cbe1e3ce71521b8a1ff0483f4cc4fa4bf (diff)
downloadqemu-5369e3c0b8997210a2558191d8451775f7643683.tar.gz
qemu-5369e3c0b8997210a2558191d8451775f7643683.tar.bz2
qemu-5369e3c0b8997210a2558191d8451775f7643683.zip
monitor: Convert do_set_link() to QObject, QError
Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Diffstat (limited to 'net.c')
-rw-r--r--net.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/net.c b/net.c
index cdba8f3571..378edfccd0 100644
--- a/net.c
+++ b/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)