aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2009-09-10 10:58:45 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2009-09-11 10:19:48 -0500
commitf0457e8d88a9ddcf7505f97cbeefd0673207713c (patch)
tree56a998d4dab3f7b50808f8cf11db2ac7751dc010
parent3c17affbff1e6fe363f5f3def5e219ab8c108b8e (diff)
downloadqemu-f0457e8d88a9ddcf7505f97cbeefd0673207713c.zip
qemu-f0457e8d88a9ddcf7505f97cbeefd0673207713c.tar.gz
qemu-f0457e8d88a9ddcf7505f97cbeefd0673207713c.tar.bz2
convert msmouse chardev to QemuOpts.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
-rw-r--r--hw/msmouse.c2
-rw-r--r--hw/msmouse.h2
-rw-r--r--qemu-char.c10
3 files changed, 7 insertions, 7 deletions
diff --git a/hw/msmouse.c b/hw/msmouse.c
index 69356a5..05f893c 100644
--- a/hw/msmouse.c
+++ b/hw/msmouse.c
@@ -64,7 +64,7 @@ static void msmouse_chr_close (struct CharDriverState *chr)
qemu_free (chr);
}
-CharDriverState *qemu_chr_open_msmouse(void)
+CharDriverState *qemu_chr_open_msmouse(QemuOpts *opts)
{
CharDriverState *chr;
diff --git a/hw/msmouse.h b/hw/msmouse.h
index 947afd9..456cb21 100644
--- a/hw/msmouse.h
+++ b/hw/msmouse.h
@@ -1,2 +1,2 @@
/* msmouse.c */
-CharDriverState *qemu_chr_open_msmouse(void);
+CharDriverState *qemu_chr_open_msmouse(QemuOpts *opts);
diff --git a/qemu-char.c b/qemu-char.c
index df53f12..9c5fe57 100644
--- a/qemu-char.c
+++ b/qemu-char.c
@@ -2226,9 +2226,10 @@ static QemuOpts *qemu_chr_parse_compat(const char *label, const char *filename)
if (NULL == opts)
return NULL;
- if (strcmp(filename, "null") == 0 ||
- strcmp(filename, "pty") == 0 ||
- strcmp(filename, "stdio") == 0) {
+ if (strcmp(filename, "null") == 0 ||
+ strcmp(filename, "pty") == 0 ||
+ strcmp(filename, "msmouse") == 0 ||
+ strcmp(filename, "stdio") == 0) {
qemu_opt_set(opts, "backend", filename);
return opts;
}
@@ -2279,6 +2280,7 @@ static const struct {
} backend_table[] = {
{ .name = "null", .open = qemu_chr_open_null },
{ .name = "socket", .open = qemu_chr_open_socket },
+ { .name = "msmouse", .open = qemu_chr_open_msmouse },
#ifdef _WIN32
{ .name = "file", .open = qemu_chr_open_win_file_out },
{ .name = "pipe", .open = qemu_chr_open_win_pipe },
@@ -2354,8 +2356,6 @@ CharDriverState *qemu_chr_open(const char *label, const char *filename, void (*i
} else {
printf("Unable to open driver: %s\n", p);
}
- } else if (!strcmp(filename, "msmouse")) {
- chr = qemu_chr_open_msmouse();
} else
#ifndef _WIN32
#if defined(__linux__)