mirror of
https://github.com/qemu/qemu.git
synced 2024-11-24 19:33:39 +08:00
convert braille chardev to QemuOpts.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
f0457e8d88
commit
dc1c21e60c
@ -563,7 +563,7 @@ static void baum_chr_read(void *opaque)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CharDriverState *chr_baum_init(void)
|
CharDriverState *chr_baum_init(QemuOpts *opts)
|
||||||
{
|
{
|
||||||
BaumDriverState *baum;
|
BaumDriverState *baum;
|
||||||
CharDriverState *chr;
|
CharDriverState *chr;
|
||||||
|
@ -26,4 +26,4 @@
|
|||||||
USBDevice *usb_baum_init(void);
|
USBDevice *usb_baum_init(void);
|
||||||
|
|
||||||
/* char device */
|
/* char device */
|
||||||
CharDriverState *chr_baum_init(void);
|
CharDriverState *chr_baum_init(QemuOpts *opts);
|
||||||
|
@ -2229,6 +2229,7 @@ static QemuOpts *qemu_chr_parse_compat(const char *label, const char *filename)
|
|||||||
if (strcmp(filename, "null") == 0 ||
|
if (strcmp(filename, "null") == 0 ||
|
||||||
strcmp(filename, "pty") == 0 ||
|
strcmp(filename, "pty") == 0 ||
|
||||||
strcmp(filename, "msmouse") == 0 ||
|
strcmp(filename, "msmouse") == 0 ||
|
||||||
|
strcmp(filename, "braille") == 0 ||
|
||||||
strcmp(filename, "stdio") == 0) {
|
strcmp(filename, "stdio") == 0) {
|
||||||
qemu_opt_set(opts, "backend", filename);
|
qemu_opt_set(opts, "backend", filename);
|
||||||
return opts;
|
return opts;
|
||||||
@ -2290,6 +2291,9 @@ static const struct {
|
|||||||
{ .name = "pty", .open = qemu_chr_open_pty },
|
{ .name = "pty", .open = qemu_chr_open_pty },
|
||||||
{ .name = "stdio", .open = qemu_chr_open_stdio },
|
{ .name = "stdio", .open = qemu_chr_open_stdio },
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef CONFIG_BRLAPI
|
||||||
|
{ .name = "braille", .open = chr_baum_init },
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
CharDriverState *qemu_chr_open_opts(QemuOpts *opts,
|
CharDriverState *qemu_chr_open_opts(QemuOpts *opts,
|
||||||
@ -2380,11 +2384,6 @@ CharDriverState *qemu_chr_open(const char *label, const char *filename, void (*i
|
|||||||
if (strstart(filename, "con:", NULL)) {
|
if (strstart(filename, "con:", NULL)) {
|
||||||
chr = qemu_chr_open_win_con(filename);
|
chr = qemu_chr_open_win_con(filename);
|
||||||
} else
|
} else
|
||||||
#endif
|
|
||||||
#ifdef CONFIG_BRLAPI
|
|
||||||
if (!strcmp(filename, "braille")) {
|
|
||||||
chr = chr_baum_init();
|
|
||||||
} else
|
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
chr = NULL;
|
chr = NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user