From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mkgjv-0007Ux-P4 for qemu-devel@nongnu.org; Mon, 07 Sep 2009 12:06:47 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mkgjo-0007QC-8K for qemu-devel@nongnu.org; Mon, 07 Sep 2009 12:06:45 -0400 Received: from [199.232.76.173] (port=34956 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mkgjn-0007Pn-VS for qemu-devel@nongnu.org; Mon, 07 Sep 2009 12:06:40 -0400 Received: from mx1.redhat.com ([209.132.183.28]:21165) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Mkgjn-0003Vc-AS for qemu-devel@nongnu.org; Mon, 07 Sep 2009 12:06:39 -0400 Received: from int-mx05.intmail.prod.int.phx2.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.18]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n87G6cNG013959 for ; Mon, 7 Sep 2009 12:06:38 -0400 From: Gerd Hoffmann Date: Mon, 7 Sep 2009 18:06:16 +0200 Message-Id: <1252339585-27797-15-git-send-email-kraxel@redhat.com> In-Reply-To: <1252339585-27797-1-git-send-email-kraxel@redhat.com> References: <1252339585-27797-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PATCH 14/23] convert braille chardev to QemuOpts. List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Gerd Hoffmann Signed-off-by: Gerd Hoffmann --- hw/baum.c | 2 +- hw/baum.h | 2 +- qemu-char.c | 9 ++++----- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/hw/baum.c b/hw/baum.c index b47ea34..a23e685 100644 --- a/hw/baum.c +++ b/hw/baum.c @@ -563,7 +563,7 @@ static void baum_chr_read(void *opaque) } } -CharDriverState *chr_baum_init(void) +CharDriverState *chr_baum_init(QemuOpts *opts) { BaumDriverState *baum; CharDriverState *chr; diff --git a/hw/baum.h b/hw/baum.h index ac34b30..39ca4b1 100644 --- a/hw/baum.h +++ b/hw/baum.h @@ -26,4 +26,4 @@ USBDevice *usb_baum_init(void); /* char device */ -CharDriverState *chr_baum_init(void); +CharDriverState *chr_baum_init(QemuOpts *opts); diff --git a/qemu-char.c b/qemu-char.c index b8ed7be..125197f 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -2229,6 +2229,7 @@ static QemuOpts *qemu_chr_parse_compat(const char *label, const char *filename) if (strcmp(filename, "null") == 0 || strcmp(filename, "pty") == 0 || strcmp(filename, "msmouse") == 0 || + strcmp(filename, "braille") == 0 || strcmp(filename, "stdio") == 0) { qemu_opt_set(opts, "backend", filename); return opts; @@ -2290,6 +2291,9 @@ static struct { { .name = "pty", .open = qemu_chr_open_pty }, { .name = "stdio", .open = qemu_chr_open_stdio }, #endif +#ifdef CONFIG_BRLAPI + { .name = "braille", .open = chr_baum_init }, +#endif }; CharDriverState *qemu_chr_open_opts(QemuOpts *opts, @@ -2381,11 +2385,6 @@ CharDriverState *qemu_chr_open(const char *label, const char *filename, void (*i chr = qemu_chr_open_win_con(filename); } else #endif -#ifdef CONFIG_BRLAPI - if (!strcmp(filename, "braille")) { - chr = chr_baum_init(); - } else -#endif { chr = NULL; } -- 1.6.2.5