vl: create "-net nic -net user" default earlier
Create it together with other default backends, even though the processing is done later. Reviewed-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
32c02fdda4
commit
d8a798f62e
16
softmmu/vl.c
16
softmmu/vl.c
|
@ -4253,6 +4253,14 @@ void qemu_init(int argc, char **argv, char **envp)
|
||||||
monitor_parse("vc:80Cx24C", "readline", false);
|
monitor_parse("vc:80Cx24C", "readline", false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (default_net) {
|
||||||
|
QemuOptsList *net = qemu_find_opts("net");
|
||||||
|
qemu_opts_parse(net, "nic", true, &error_abort);
|
||||||
|
#ifdef CONFIG_SLIRP
|
||||||
|
qemu_opts_parse(net, "user", true, &error_abort);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
#if defined(CONFIG_VNC)
|
#if defined(CONFIG_VNC)
|
||||||
if (!QTAILQ_EMPTY(&(qemu_find_opts("vnc")->head))) {
|
if (!QTAILQ_EMPTY(&(qemu_find_opts("vnc")->head))) {
|
||||||
display_remote++;
|
display_remote++;
|
||||||
|
@ -4388,14 +4396,6 @@ void qemu_init(int argc, char **argv, char **envp)
|
||||||
semihosting_arg_fallback(kernel_filename, kernel_cmdline);
|
semihosting_arg_fallback(kernel_filename, kernel_cmdline);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (default_net) {
|
|
||||||
QemuOptsList *net = qemu_find_opts("net");
|
|
||||||
qemu_opts_parse(net, "nic", true, &error_abort);
|
|
||||||
#ifdef CONFIG_SLIRP
|
|
||||||
qemu_opts_parse(net, "user", true, &error_abort);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
if (net_init_clients(&err) < 0) {
|
if (net_init_clients(&err) < 0) {
|
||||||
error_report_err(err);
|
error_report_err(err);
|
||||||
exit(1);
|
exit(1);
|
||||||
|
|
Loading…
Reference in New Issue