[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 16/22] vl: create "-net nic -net user" default earlier
From: |
Paolo Bonzini |
Subject: |
[PATCH 16/22] vl: create "-net nic -net user" default earlier |
Date: |
Wed, 21 Oct 2020 16:57:10 -0400 |
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(-)
diff --git a/softmmu/vl.c b/softmmu/vl.c
index 122bf1821b..8577667b8f 100644
--- a/softmmu/vl.c
+++ b/softmmu/vl.c
@@ -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);
--
2.26.2
- [PATCH 19/22] vl: extract default devices to separate functions, (continued)
- [PATCH 19/22] vl: extract default devices to separate functions, Paolo Bonzini, 2020/10/21
- [PATCH 18/22] vl: move semihosting command line fallback to qemu_finish_machine_init, Paolo Bonzini, 2020/10/21
- [PATCH 20/22] vl: move CHECKPOINT_INIT after preconfig, Paolo Bonzini, 2020/10/21
- [PATCH 22/22] vl: separate qemu_create_late_backends, Paolo Bonzini, 2020/10/21
- [PATCH 10/22] vl: extract qemu_init_subsystems, Paolo Bonzini, 2020/10/21
- [PATCH 14/22] vl: preconfig and loadvm are mutually exclusive, Paolo Bonzini, 2020/10/21
- [PATCH 17/22] vl: load plugins as late as possible, Paolo Bonzini, 2020/10/21
- [PATCH 13/22] vl: extract various command line validation snippets to a new function, Paolo Bonzini, 2020/10/21
- [PATCH 16/22] vl: create "-net nic -net user" default earlier,
Paolo Bonzini <=
- [PATCH 09/22] vl: move various initialization routines out of qemu_init, Paolo Bonzini, 2020/10/21
- [PATCH 12/22] vl: move bios_name out of softmmu/vl.c, Paolo Bonzini, 2020/10/21
- [PATCH 21/22] vl: separate qemu_create_early_backends, Paolo Bonzini, 2020/10/21