- cvm : bug fix for undefined reference to 'virtcca_cvm_allowed' while compiling - cvm : bug-fix for incorrect device name check for vhost-user-fs - target/i386: add control bits support for LAM - target/i386: add support for LAM in CPUID enumeration - Add support for the virtcca cvm feature. - target/sparc: use signed denominator in sdiv helper - crypto: Introduce SM4 symmetric cipher algorithm - ppc/vof: Fix unaligned FDT property access - vl: fix "type is NULL" in -vga help - hw/display/bcm2835_fb: fix fb_use_offsets condition - aspeed/smc: Fix possible integer overflow - hw/nvme: fix number of PIDs for FDP RUH update - hw/nvme: fix memory leak in nvme_dsm - hvf: arm: Do not advance PC when raising an exception - physmem: Bail out qemu_ram_block_from_host() for invalid ram addrs Signed-off-by: Jiabo Feng <fengjiabo1@huawei.com>
50 lines
1.5 KiB
Diff
50 lines
1.5 KiB
Diff
From ef42d79d805e430e24df57d46c156f9a7e3e1bed Mon Sep 17 00:00:00 2001
|
|
From: qihao <qihao_yewu@cmss.chinamobile.com>
|
|
Date: Thu, 25 Jul 2024 14:11:12 +0800
|
|
Subject: [PATCH] vl: fix "type is NULL" in -vga help
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
cheery-pick from a99dc9cd611cbaf10edee6260272e299626d0871
|
|
|
|
Don't pass NULL to module_object_class_by_name(), when the interface is
|
|
unavailable.
|
|
|
|
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
|
|
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
|
|
Message-ID: <20240715114420.2062870-1-marcandre.lureau@redhat.com>
|
|
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
|
|
Signed-off-by: qihao_yewu <qihao_yewu@cmss.chinamobile.com>
|
|
---
|
|
system/vl.c | 13 ++++++++++---
|
|
1 file changed, 10 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/system/vl.c b/system/vl.c
|
|
index 165c3cae8a..8e3357c578 100644
|
|
--- a/system/vl.c
|
|
+++ b/system/vl.c
|
|
@@ -994,9 +994,16 @@ static bool vga_interface_available(VGAInterfaceType t)
|
|
const VGAInterfaceInfo *ti = &vga_interfaces[t];
|
|
|
|
assert(t < VGA_TYPE_MAX);
|
|
- return !ti->class_names[0] ||
|
|
- module_object_class_by_name(ti->class_names[0]) ||
|
|
- module_object_class_by_name(ti->class_names[1]);
|
|
+
|
|
+ if (!ti->class_names[0] || module_object_class_by_name(ti->class_names[0])) {
|
|
+ return true;
|
|
+ }
|
|
+
|
|
+ if (ti->class_names[1] && module_object_class_by_name(ti->class_names[1])) {
|
|
+ return true;
|
|
+ }
|
|
+
|
|
+ return false;
|
|
}
|
|
|
|
static const char *
|
|
--
|
|
2.41.0.windows.1
|
|
|