]> git.proxmox.com Git - qemu.git/commitdiff
net: Fix do_set_link() return type
authorLuiz Capitulino <lcapitulino@redhat.com>
Mon, 3 Aug 2009 16:56:59 +0000 (13:56 -0300)
committerAnthony Liguori <aliguori@us.ibm.com>
Fri, 28 Aug 2009 02:23:38 +0000 (21:23 -0500)
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:

net.c
net.h

diff --git a/net.c b/net.c
index cf6b0337ef5f4303f4c118b4e1e73e516867e682..0b531a69b499cc9f2101cead21a5feab11006d95 100644 (file)
--- a/net.c
+++ b/net.c
@@ -2934,7 +2934,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;
@@ -2947,7 +2947,7 @@ done:
 
     if (!vc) {
         monitor_printf(mon, "could not find network device '%s'", name);
-        return 0;
+        return;
     }
 
     if (strcmp(up_or_down, "up") == 0)
@@ -2960,8 +2960,6 @@ done:
 
     if (vc->link_status_changed)
         vc->link_status_changed(vc);
-
-    return 1;
 }
 
 void net_cleanup(void)
diff --git a/net.h b/net.h
index 188fa395e4ace089dca13489a2bd6c32d1ea3b4d..3ac9e8c9681d14a1026cb9cb7ebdf4aafbbeae0d 100644 (file)
--- a/net.h
+++ b/net.h
@@ -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);