From patchwork Mon Feb 25 09:03:38 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 222875 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id E14692C02B5 for ; Mon, 25 Feb 2013 20:25:44 +1100 (EST) Received: from localhost ([::1]:36546 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U9tzT-0006zz-KH for incoming@patchwork.ozlabs.org; Mon, 25 Feb 2013 04:04:55 -0500 Received: from eggs.gnu.org ([208.118.235.92]:48768) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U9tyT-0005Qs-Mg for qemu-devel@nongnu.org; Mon, 25 Feb 2013 04:03:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U9tyN-0006Ke-QG for qemu-devel@nongnu.org; Mon, 25 Feb 2013 04:03:53 -0500 Received: from mx1.redhat.com ([209.132.183.28]:37902) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U9tyN-0006K0-Gx for qemu-devel@nongnu.org; Mon, 25 Feb 2013 04:03:47 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r1P93kVh025642 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 25 Feb 2013 04:03:46 -0500 Received: from rincewind.home.kraxel.org (ovpn-116-23.ams2.redhat.com [10.36.116.23]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r1P93jnZ032541; Mon, 25 Feb 2013 04:03:46 -0500 Received: by rincewind.home.kraxel.org (Postfix, from userid 500) id 55A5C42DED; Mon, 25 Feb 2013 10:03:44 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Mon, 25 Feb 2013 10:03:38 +0100 Message-Id: <1361783023-10082-7-git-send-email-kraxel@redhat.com> In-Reply-To: <1361783023-10082-1-git-send-email-kraxel@redhat.com> References: <1361783023-10082-1-git-send-email-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: Anthony Liguori , Gerd Hoffmann Subject: [Qemu-devel] [PATCH 4/9] chardev: add msmouse support to qapi X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org This patch adds 'msmouse' support to qapi and also switches over the msmouse chardev initialization to the new qapi code path. Signed-off-by: Gerd Hoffmann --- hw/msmouse.c | 2 +- hw/msmouse.h | 2 +- qapi-schema.json | 3 ++- qemu-char.c | 5 ++++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/hw/msmouse.c b/hw/msmouse.c index ef47aed..1e0b84f 100644 --- a/hw/msmouse.c +++ b/hw/msmouse.c @@ -64,7 +64,7 @@ static void msmouse_chr_close (struct CharDriverState *chr) g_free (chr); } -CharDriverState *qemu_chr_open_msmouse(QemuOpts *opts) +CharDriverState *qemu_chr_open_msmouse(void) { CharDriverState *chr; diff --git a/hw/msmouse.h b/hw/msmouse.h index 8cff3a7..a1f1759 100644 --- a/hw/msmouse.h +++ b/hw/msmouse.h @@ -2,6 +2,6 @@ #define HW_MSMOUSE_H 1 /* msmouse.c */ -CharDriverState *qemu_chr_open_msmouse(QemuOpts *opts); +CharDriverState *qemu_chr_open_msmouse(void); #endif diff --git a/qapi-schema.json b/qapi-schema.json index d633e1f..cd93707 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -3160,7 +3160,8 @@ 'socket' : 'ChardevSocket', 'pty' : 'ChardevDummy', 'null' : 'ChardevDummy', - 'mux' : 'ChardevMux' } } + 'mux' : 'ChardevMux', + 'msmouse': 'ChardevDummy' } } ## # @ChardevReturn: diff --git a/qemu-char.c b/qemu-char.c index ec49fb7..c824ed8 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -2983,7 +2983,7 @@ static const struct { { .name = "null", .kind = CHARDEV_BACKEND_KIND_NULL }, { .name = "socket", .open = qemu_chr_open_socket }, { .name = "udp", .open = qemu_chr_open_udp }, - { .name = "msmouse", .open = qemu_chr_open_msmouse }, + { .name = "msmouse", .kind = CHARDEV_BACKEND_KIND_MSMOUSE }, { .name = "vc", .open = vc_init }, { .name = "memory", .open = qemu_chr_open_ringbuf }, #ifdef _WIN32 @@ -3477,6 +3477,9 @@ ChardevReturn *qmp_chardev_add(const char *id, ChardevBackend *backend, } chr = qemu_chr_open_mux(base); break; + case CHARDEV_BACKEND_KIND_MSMOUSE: + chr = qemu_chr_open_msmouse(); + break; default: error_setg(errp, "unknown chardev backend (%d)", backend->kind); break;