mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 00:33:55 -06:00
Warn user if the vga flag is passed but no vga device is created
A global boolean variable "vga_interface_created"(declared in softmmu/globals.c) has been used to track the creation of vga interface. If the vga flag is passed in the command line "default_vga"(declared in softmmu/vl.c) variable is set to 0. To warn user, the condition checks if vga_interface_created is false and default_vga is equal to 0. If "-vga none" is passed, this patch will not warn the user regarding the creation of VGA device. The warning "A -vga option was passed but this machine type does not use that option; no VGA device has been created" is logged if vga flag is passed but no vga device is created. This patch has been tested for x86_64, i386, sparc, sparc64 and arm boards. Signed-off-by: Gautam Agrawal <gautamnagrawal@gmail.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Resolves: https://gitlab.com/qemu-project/qemu/-/issues/581 Message-Id: <20220501122505.29202-1-gautamnagrawal@gmail.com> [thuth: Fix wrong warning with "-device" in some cases as reported by Paolo] Signed-off-by: Thomas Huth <thuth@redhat.com>
This commit is contained in:
parent
26f0ee7ddb
commit
f9bcb2d684
11 changed files with 18 additions and 0 deletions
|
@ -632,6 +632,7 @@ static void sun4uv_init(MemoryRegion *address_space_mem,
|
|||
switch (vga_interface_type) {
|
||||
case VGA_STD:
|
||||
pci_create_simple(pci_busA, PCI_DEVFN(2, 0), "VGA");
|
||||
vga_interface_created = true;
|
||||
break;
|
||||
case VGA_NONE:
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue