diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2014-10-28 10:09:11 +0100 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2014-11-03 18:32:48 +0200 |
commit | 6f00494abed261cdbfdd003fe45f671eb3a56d78 (patch) | |
tree | dda44144dd537ef9f5e3a67b0ad88ce686f1e2be /vl.c | |
parent | d3f16ec887bb58b19eac94fcae139a39a7933e15 (diff) | |
download | qemu-6f00494abed261cdbfdd003fe45f671eb3a56d78.zip |
vga: add default display to machine class
This allows machine classes to specify which display device they want
as default. If unspecified the current behavior (try cirrus, failing
that try stdvga, failing that use no display) will be used.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'vl.c')
-rw-r--r-- | vl.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -1444,6 +1444,7 @@ static void machine_class_init(ObjectClass *oc, void *data) mc->is_default = qm->is_default; mc->default_machine_opts = qm->default_machine_opts; mc->default_boot_order = qm->default_boot_order; + mc->default_display = qm->default_display; mc->compat_props = qm->compat_props; mc->hw_version = qm->hw_version; } @@ -4223,7 +4224,9 @@ int main(int argc, char **argv, char **envp) /* If no default VGA is requested, the default is "none". */ if (default_vga) { - if (cirrus_vga_available()) { + if (machine_class->default_display) { + vga_model = machine_class->default_display; + } else if (cirrus_vga_available()) { vga_model = "cirrus"; } else if (vga_available()) { vga_model = "std"; |