diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2020-10-21 06:01:30 -0400 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2020-12-10 12:15:12 -0500 |
commit | d8a798f62e0c0bc5f7bf4968f52ed5e9a6357465 (patch) | |
tree | 77ec73c488b0c17d559b0d2780f811daf535eb4c /softmmu | |
parent | 32c02fdda49b8ace1517f1b95bfc215e0b92a154 (diff) |
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>
Diffstat (limited to 'softmmu')
-rw-r--r-- | softmmu/vl.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/softmmu/vl.c b/softmmu/vl.c index 5571f9ff75..a4b87ae742 100644 --- a/softmmu/vl.c +++ b/softmmu/vl.c @@ -4253,6 +4253,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_parse(net, "nic", true, &error_abort); +#ifdef CONFIG_SLIRP + qemu_opts_parse(net, "user", true, &error_abort); +#endif + } + #if defined(CONFIG_VNC) if (!QTAILQ_EMPTY(&(qemu_find_opts("vnc")->head))) { display_remote++; @@ -4388,14 +4396,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_parse(net, "nic", true, &error_abort); -#ifdef CONFIG_SLIRP - qemu_opts_parse(net, "user", true, &error_abort); -#endif - } - if (net_init_clients(&err) < 0) { error_report_err(err); exit(1); |