提交 668680f7 编写于 作者: M Markus Armbruster 提交者: Anthony Liguori

net: net_check_clients() runs too early to see -device, fix

Call it right after -device devices get created.
Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
上级 7f76abe1
......@@ -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;
}
......
......@@ -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);
......
......@@ -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 */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册