]> Git Repo - qemu.git/commitdiff
net: net_check_clients() runs too early to see -device, fix
authorMarkus Armbruster <[email protected]>
Thu, 11 Feb 2010 13:44:58 +0000 (14:44 +0100)
committerAnthony Liguori <[email protected]>
Fri, 19 Feb 2010 18:12:46 +0000 (12:12 -0600)
Call it right after -device devices get created.

Signed-off-by: Markus Armbruster <[email protected]>
Signed-off-by: Anthony Liguori <[email protected]>
net.c
net.h
vl.c

diff --git a/net.c b/net.c
index f51d3761301aead39902df5b7edfbd20b2cd7ea1..38b65f49050869f672598f7c33d72ef647a02f16 100644 (file)
--- a/net.c
+++ b/net.c
@@ -1275,7 +1275,7 @@ void net_cleanup(void)
     }
 }
 
-static void net_check_clients(void)
+void net_check_clients(void)
 {
     VLANState *vlan;
 
@@ -1323,8 +1323,6 @@ int net_init_clients(void)
         return -1;
     }
 
-    net_check_clients();
-
     return 0;
 }
 
diff --git a/net.h b/net.h
index ecbd8122a07f728b644cd9aa93f946f8059cdebb..3467c1087819de3330425ed94a7911847080981b 100644 (file)
--- a/net.h
+++ b/net.h
@@ -165,6 +165,7 @@ extern const char *legacy_bootp_filename;
 int net_client_init(Monitor *mon, QemuOpts *opts, int is_netdev);
 int net_client_parse(QemuOptsList *opts_list, const char *str);
 int net_init_clients(void);
+void net_check_clients(void);
 void net_cleanup(void);
 void net_set_boot_mask(int boot_mask);
 void net_host_device_add(Monitor *mon, const QDict *qdict);
diff --git a/vl.c b/vl.c
index 98918ac49d25bdf2a66b07552573e83251259b77..084604ff9e1909266267d9e220fd3e958743f3c4 100644 (file)
--- a/vl.c
+++ b/vl.c
@@ -5897,6 +5897,8 @@ int main(int argc, char **argv, char **envp)
     if (qemu_opts_foreach(&qemu_device_opts, device_init_func, NULL, 1) != 0)
         exit(1);
 
+    net_check_clients();
+
     if (!display_state)
         dumb_display_init();
     /* just use the first displaystate for the moment */
This page took 0.039444 seconds and 4 git commands to generate.