aboutsummaryrefslogtreecommitdiffstats
path: root/hw
diff options
context:
space:
mode:
authorSasha Levin <levinsasha928@gmail.com>2012-09-05 10:31:58 +0200
committerWill Deacon <will.deacon@arm.com>2015-06-01 16:39:53 +0100
commit07d52d7721f17a0f59e12773517d7975c3af349e (patch)
treef7b7f598b3feb40f5ae7c396353ed09cd4772aac /hw
parentbe1eb89b7505c5f5276b7d6a91b5b4d84d774f62 (diff)
downloadkvmtool-07d52d7721f17a0f59e12773517d7975c3af349e.tar.gz
kvm tools: ui improvements
Move the vesa initialization logic into sdl__init() and vnc__init(), builtin-run shouldn't have to know about the conditions for initializing vesa on it's own. Signed-off-by: Sasha Levin <levinsasha928@gmail.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
Diffstat (limited to 'hw')
-rw-r--r--hw/vesa.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/hw/vesa.c b/hw/vesa.c
index 09512d5d..6f2d9f41 100644
--- a/hw/vesa.c
+++ b/hw/vesa.c
@@ -53,6 +53,9 @@ struct framebuffer *vesa__init(struct kvm *kvm)
char *mem;
int r;
+ if (!kvm->cfg.vnc && !kvm->cfg.sdl)
+ return NULL;
+
r = irq__register_device(PCI_DEVICE_ID_VESA, &dev, &pin, &line);
if (r < 0)
return ERR_PTR(r);