提交 5ab8211b 编写于 作者: A Anthony Liguori

qemu-char: move msmouse registeration to msmouse.c

Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
Signed-off-by: NAmit Shah <amit.shah@redhat.com>
Message-id: b47d1153b0d7669743c9a6bb98ce30f4cf7f876b.1362505276.git.amit.shah@redhat.com
Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
上级 08744c98
......@@ -25,7 +25,6 @@
#include "qemu-common.h"
#include "char/char.h"
#include "ui/console.h"
#include "msmouse.h"
#define MSMOUSE_LO6(n) ((n) & 0x3f)
#define MSMOUSE_HI2(n) (((n) & 0xc0) >> 6)
......@@ -64,7 +63,7 @@ static void msmouse_chr_close (struct CharDriverState *chr)
g_free (chr);
}
CharDriverState *qemu_chr_open_msmouse(QemuOpts *opts)
static CharDriverState *qemu_chr_open_msmouse(QemuOpts *opts)
{
CharDriverState *chr;
......@@ -76,3 +75,10 @@ CharDriverState *qemu_chr_open_msmouse(QemuOpts *opts)
return chr;
}
static void register_types(void)
{
register_char_driver("msmouse", qemu_chr_open_msmouse);
}
type_init(register_types);
#ifndef HW_MSMOUSE_H
#define HW_MSMOUSE_H 1
/* msmouse.c */
CharDriverState *qemu_chr_open_msmouse(QemuOpts *opts);
#endif
......@@ -28,7 +28,6 @@
#include "qemu/timer.h"
#include "char/char.h"
#include "hw/usb.h"
#include "hw/msmouse.h"
#include "qmp-commands.h"
#include <unistd.h>
......@@ -2179,6 +2178,7 @@ static CharDriverState *qemu_chr_open_win_stdio(QemuOpts *opts)
}
#endif /* !_WIN32 */
/***********************************************************/
/* UDP Net console */
......@@ -3663,7 +3663,6 @@ static void register_types(void)
register_char_driver("null", qemu_chr_open_null);
register_char_driver("socket", qemu_chr_open_socket);
register_char_driver("udp", qemu_chr_open_udp);
register_char_driver("msmouse", qemu_chr_open_msmouse);
register_char_driver("vc", vc_init);
register_char_driver("memory", qemu_chr_open_ringbuf);
#ifdef _WIN32
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册