From patchwork Mon Feb 25 09:03:37 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 222874 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 A02DD2C029B for ; Mon, 25 Feb 2013 20:23:04 +1100 (EST) Received: from localhost ([::1]:35700 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U9tyz-0006YD-JU for incoming@patchwork.ozlabs.org; Mon, 25 Feb 2013 04:04:25 -0500 Received: from eggs.gnu.org ([208.118.235.92]:48717) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U9tyQ-0005NY-Qf for qemu-devel@nongnu.org; Mon, 25 Feb 2013 04:03:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U9tyN-0006KF-H2 for qemu-devel@nongnu.org; Mon, 25 Feb 2013 04:03:50 -0500 Received: from mx1.redhat.com ([209.132.183.28]:41095) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U9tyN-0006Js-9j for qemu-devel@nongnu.org; Mon, 25 Feb 2013 04:03:47 -0500 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r1P93k7X025639 (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-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r1P93jxd030279; Mon, 25 Feb 2013 04:03:46 -0500 Received: by rincewind.home.kraxel.org (Postfix, from userid 500) id 4178442DEC; Mon, 25 Feb 2013 10:03:44 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Mon, 25 Feb 2013 10:03:37 +0100 Message-Id: <1361783023-10082-6-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.67 on 10.5.11.11 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 3/9] chardev: switch null init 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 switches over the 'null' chardev initialization to the new qapi code path. Signed-off-by: Gerd Hoffmann --- qemu-char.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/qemu-char.c b/qemu-char.c index fc908fa..ec49fb7 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -221,7 +221,7 @@ static int null_chr_write(CharDriverState *chr, const uint8_t *buf, int len) return len; } -static CharDriverState *qemu_chr_open_null(QemuOpts *opts) +static CharDriverState *qemu_chr_open_null(void) { CharDriverState *chr; @@ -2980,7 +2980,7 @@ static const struct { const int kind; void (*parse)(QemuOpts *opts, ChardevBackend *backend, Error **errp); } backend_table[] = { - { .name = "null", .open = qemu_chr_open_null }, + { .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 }, @@ -3466,7 +3466,7 @@ ChardevReturn *qmp_chardev_add(const char *id, ChardevBackend *backend, } #endif case CHARDEV_BACKEND_KIND_NULL: - chr = qemu_chr_open_null(NULL); + chr = qemu_chr_open_null(); break; case CHARDEV_BACKEND_KIND_MUX: base = qemu_chr_find(backend->mux->chardev);