net: Fix do_set_link() return type

do_set_link() returns int, but Monitor handler functions should
always return void.

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Message-Id:
This commit is contained in:
Luiz Capitulino 2009-08-03 13:56:59 -03:00 committed by Anthony Liguori
parent 09c0848e52
commit c3cf0d3f96
2 changed files with 3 additions and 5 deletions

6
net.c
View File

@ -2905,7 +2905,7 @@ void do_info_network(Monitor *mon)
}
}
int do_set_link(Monitor *mon, const char *name, const char *up_or_down)
void do_set_link(Monitor *mon, const char *name, const char *up_or_down)
{
VLANState *vlan;
VLANClientState *vc = NULL;
@ -2918,7 +2918,7 @@ done:
if (!vc) {
monitor_printf(mon, "could not find network device '%s'", name);
return 0;
return;
}
if (strcmp(up_or_down, "up") == 0)
@ -2931,8 +2931,6 @@ done:
if (vc->link_status_changed)
vc->link_status_changed(vc);
return 1;
}
void net_cleanup(void)

2
net.h
View File

@ -79,7 +79,7 @@ void qemu_check_nic_model_list(NICInfo *nd, const char * const *models,
void qemu_handler_true(void *opaque);
void do_info_network(Monitor *mon);
int do_set_link(Monitor *mon, const char *name, const char *up_or_down);
void do_set_link(Monitor *mon, const char *name, const char *up_or_down);
void do_info_usernet(Monitor *mon);