mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
vl: constify VGAInterfaceInfo
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-id: 20190412152713.16018-2-marcandre.lureau@redhat.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
parent
fad691db49
commit
53b93511f1
1 changed files with 3 additions and 3 deletions
6
vl.c
6
vl.c
|
@ -2015,7 +2015,7 @@ typedef struct VGAInterfaceInfo {
|
||||||
const char *class_names[2];
|
const char *class_names[2];
|
||||||
} VGAInterfaceInfo;
|
} VGAInterfaceInfo;
|
||||||
|
|
||||||
static VGAInterfaceInfo vga_interfaces[VGA_TYPE_MAX] = {
|
static const VGAInterfaceInfo vga_interfaces[VGA_TYPE_MAX] = {
|
||||||
[VGA_NONE] = {
|
[VGA_NONE] = {
|
||||||
.opt_name = "none",
|
.opt_name = "none",
|
||||||
},
|
},
|
||||||
|
@ -2061,7 +2061,7 @@ static VGAInterfaceInfo vga_interfaces[VGA_TYPE_MAX] = {
|
||||||
|
|
||||||
static bool vga_interface_available(VGAInterfaceType t)
|
static bool vga_interface_available(VGAInterfaceType t)
|
||||||
{
|
{
|
||||||
VGAInterfaceInfo *ti = &vga_interfaces[t];
|
const VGAInterfaceInfo *ti = &vga_interfaces[t];
|
||||||
|
|
||||||
assert(t < VGA_TYPE_MAX);
|
assert(t < VGA_TYPE_MAX);
|
||||||
return !ti->class_names[0] ||
|
return !ti->class_names[0] ||
|
||||||
|
@ -2076,7 +2076,7 @@ static void select_vgahw(const char *p)
|
||||||
|
|
||||||
assert(vga_interface_type == VGA_NONE);
|
assert(vga_interface_type == VGA_NONE);
|
||||||
for (t = 0; t < VGA_TYPE_MAX; t++) {
|
for (t = 0; t < VGA_TYPE_MAX; t++) {
|
||||||
VGAInterfaceInfo *ti = &vga_interfaces[t];
|
const VGAInterfaceInfo *ti = &vga_interfaces[t];
|
||||||
if (ti->opt_name && strstart(p, ti->opt_name, &opts)) {
|
if (ti->opt_name && strstart(p, ti->opt_name, &opts)) {
|
||||||
if (!vga_interface_available(t)) {
|
if (!vga_interface_available(t)) {
|
||||||
error_report("%s not available", ti->name);
|
error_report("%s not available", ti->name);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue