From patchwork Mon Sep 7 16:06:15 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 33097 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by bilbo.ozlabs.org (Postfix) with ESMTPS id 851E6B708C for ; Tue, 8 Sep 2009 02:31:42 +1000 (EST) Received: from localhost ([127.0.0.1]:53155 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mkh7y-0001nD-Td for incoming@patchwork.ozlabs.org; Mon, 07 Sep 2009 12:31:38 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mkgjx-0007Xh-5u for qemu-devel@nongnu.org; Mon, 07 Sep 2009 12:06:49 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mkgjo-0007Py-6E for qemu-devel@nongnu.org; Mon, 07 Sep 2009 12:06:45 -0400 Received: from [199.232.76.173] (port=34954 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mkgjn-0007Pf-Ny for qemu-devel@nongnu.org; Mon, 07 Sep 2009 12:06:39 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45922) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Mkgjn-0003VY-5K 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 n87G6cf2017079 for ; Mon, 7 Sep 2009 12:06:38 -0400 Received: from zweiblum.home.kraxel.org (vpn2-9-74.ams2.redhat.com [10.36.9.74]) by int-mx05.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with SMTP id n87G6Xlx025022; Mon, 7 Sep 2009 12:06:34 -0400 Received: by zweiblum.home.kraxel.org (Postfix, from userid 500) id 76344700EC; Mon, 7 Sep 2009 18:06:26 +0200 (CEST) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Mon, 7 Sep 2009 18:06:15 +0200 Message-Id: <1252339585-27797-14-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> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.18 X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Cc: Gerd Hoffmann Subject: [Qemu-devel] [PATCH 13/23] convert msmouse chardev to QemuOpts. X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Signed-off-by: Gerd Hoffmann --- hw/msmouse.c | 2 +- hw/msmouse.h | 2 +- qemu-char.c | 10 +++++----- 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 f649280..b8ed7be 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 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__)