[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] vga: print friendly error message in case multi
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH] vga: print friendly error message in case multiple vga devices are added |
Date: |
Mon, 7 May 2018 13:10:40 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 |
On 05/07/2018 05:10 AM, Gerd Hoffmann wrote:
... to a virtual machine. Without that we fail a ramblock register
sanity check, leading to a abort(), which isn't exactly user friendly.
https://bugzilla.redhat.com/show_bug.cgi?id=1206037
Signed-off-by: Gerd Hoffmann <address@hidden>
---
hw/display/vga.c | 8 ++++++++
1 file changed, 8 insertions(+)
+ if (global_vmstate) {
+ static int have_vga;
It looks funny to declare this as int,
+ if (have_vga) {
+ error_report("only one vga device is supported");
+ exit(1);
+ }
+ have_vga = true;
but to treat it as bool. Why not just declare it as bool to begin with?
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
Re: [Qemu-devel] [PATCH] vga: print friendly error message in case multiple vga devices are added,
Eric Blake <=