qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 01/10] vl.c: Do not add isa-parallel if it's not present


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH 01/10] vl.c: Do not add isa-parallel if it's not present
Date: Mon, 6 Feb 2023 16:02:58 +0100
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.6.1

On 6/2/23 15:08, Fabiano Rosas wrote:
Currently the isa-parallel driver is always added by default
regardless of the presence of the actual code in the build, which can
lead to a crash:

qemu-system-i386: unknown type 'isa-parallel'
Aborted (core dumped)

Check for the presence of the QOM class and do not include
isa-parallel by default if it's not found.

Signed-off-by: Fabiano Rosas <farosas@suse.de>
---
  softmmu/vl.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/softmmu/vl.c b/softmmu/vl.c
index 9177d95d4e..614e6cf66e 100644
--- a/softmmu/vl.c
+++ b/softmmu/vl.c
@@ -1269,7 +1269,8 @@ static void qemu_disable_default_devices(void)
      if (!has_defaults || machine_class->no_serial) {
          default_serial = 0;
      }
-    if (!has_defaults || machine_class->no_parallel) {
+    if (!has_defaults || machine_class->no_parallel ||
+        !object_class_by_name("isa-parallel")) {
          default_parallel = 0;
      }
      if (!has_defaults || machine_class->no_floppy) {

How is isa-parallel different, why not the other defaults?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]