@@ -4235,6 +4235,14 @@ void qemu_init(int argc, char **argv, char **envp)
monitor_parse("vc:80Cx24C", "readline", false);
}
+ if (default_net) {
+ QemuOptsList *net = qemu_find_opts("net");
+ qemu_opts_set(net, NULL, "type", "nic", &error_abort);
+#ifdef CONFIG_SLIRP
+ qemu_opts_set(net, NULL, "type", "user", &error_abort);
+#endif
+ }
+
#if defined(CONFIG_VNC)
if (!QTAILQ_EMPTY(&(qemu_find_opts("vnc")->head))) {
display_remote++;
@@ -4370,14 +4378,6 @@ void qemu_init(int argc, char **argv, char **envp)
semihosting_arg_fallback(kernel_filename, kernel_cmdline);
}
- if (default_net) {
- QemuOptsList *net = qemu_find_opts("net");
- qemu_opts_set(net, NULL, "type", "nic", &error_abort);
-#ifdef CONFIG_SLIRP
- qemu_opts_set(net, NULL, "type", "user", &error_abort);
-#endif
- }
-
if (net_init_clients(&err) < 0) {
error_report_err(err);
exit(1);
Create it together with other default backends, even though the processing is done later. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> --- softmmu/vl.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)