]> git.proxmox.com Git - qemu.git/blobdiff - backends/msmouse.c
qdev-properties-system.c: Allow vlan or netdev for -device, not both
[qemu.git] / backends / msmouse.c
index 407ec8778451558193920fb0f0abe49a5919b345..c0dbfcdd6bf2c87c0d0d0983748cb7a9d774b11d 100644 (file)
@@ -23,7 +23,7 @@
  */
 #include <stdlib.h>
 #include "qemu-common.h"
-#include "char/char.h"
+#include "sysemu/char.h"
 #include "ui/console.h"
 
 #define MSMOUSE_LO6(n) ((n) & 0x3f)
@@ -63,13 +63,14 @@ static void msmouse_chr_close (struct CharDriverState *chr)
     g_free (chr);
 }
 
-static CharDriverState *qemu_chr_open_msmouse(QemuOpts *opts)
+CharDriverState *qemu_chr_open_msmouse(void)
 {
     CharDriverState *chr;
 
     chr = g_malloc0(sizeof(CharDriverState));
     chr->chr_write = msmouse_chr_write;
     chr->chr_close = msmouse_chr_close;
+    chr->explicit_be_open = true;
 
     qemu_add_mouse_event_handler(msmouse_event, chr, 0, "QEMU Microsoft Mouse");
 
@@ -78,7 +79,7 @@ static CharDriverState *qemu_chr_open_msmouse(QemuOpts *opts)
 
 static void register_types(void)
 {
-    register_char_driver("msmouse", qemu_chr_open_msmouse);
+    register_char_driver_qapi("msmouse", CHARDEV_BACKEND_KIND_MSMOUSE, NULL);
 }
 
 type_init(register_types);