aboutsummaryrefslogtreecommitdiff
path: root/hw/pc.c
diff options
context:
space:
mode:
authorBlue Swirl <blauwirbel@gmail.com>2011-02-05 14:34:52 +0000
committerBlue Swirl <blauwirbel@gmail.com>2011-02-12 09:43:44 +0000
commit86d864140bc597dce0fedf8547f4d615a920c444 (patch)
tree02dd6fbfc5cf10e0eca8bd614b54bd0ea59e065b /hw/pc.c
parent86f4a9a5c7f1d98b73520ff9f396206ebc5ddb71 (diff)
x86: make vmmouse optional
Compile vmmouse in hwlib. Ignore failure if vmmouse device can't be created. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'hw/pc.c')
-rw-r--r--hw/pc.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/hw/pc.c b/hw/pc.c
index cde20c06da..00fe04e9d7 100644
--- a/hw/pc.c
+++ b/hw/pc.c
@@ -1134,8 +1134,10 @@ void pc_basic_device_init(qemu_irq *isa_irq,
i8042 = isa_create_simple("i8042");
i8042_setup_a20_line(i8042, &a20_line[0]);
vmport_init();
- vmmouse = isa_create("vmmouse");
- qdev_prop_set_ptr(&vmmouse->qdev, "ps2_mouse", i8042);
+ vmmouse = isa_try_create("vmmouse");
+ if (vmmouse) {
+ qdev_prop_set_ptr(&vmmouse->qdev, "ps2_mouse", i8042);
+ }
port92 = isa_create_simple("port92");
port92_init(port92, &a20_line[1]);