From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:57698) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TtFwo-0002YX-3X for qemu-devel@nongnu.org; Thu, 10 Jan 2013 06:05:24 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TtFwm-00041l-R5 for qemu-devel@nongnu.org; Thu, 10 Jan 2013 06:05:22 -0500 Received: from mx1.redhat.com ([209.132.183.28]:38815) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TtFwm-00041Z-KD for qemu-devel@nongnu.org; Thu, 10 Jan 2013 06:05:20 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r0AB5JnC020398 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 10 Jan 2013 06:05:19 -0500 Message-ID: <50EEA06B.9070200@redhat.com> Date: Thu, 10 Jan 2013 12:05:15 +0100 From: Gerd Hoffmann MIME-Version: 1.0 References: <1357566928-25361-1-git-send-email-kraxel@redhat.com> <1357566928-25361-9-git-send-email-kraxel@redhat.com> <50EE9A35.3080501@redhat.com> In-Reply-To: <50EE9A35.3080501@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 08/11] chardev: add serial chardev support to chardev-add (qmp) List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: qemu-devel@nongnu.org Hi, >> diff --git a/qapi-schema.json b/qapi-schema.json >> index 7e5c8c2..d833385 100644 >> --- a/qapi-schema.json >> +++ b/qapi-schema.json >> @@ -3036,7 +3036,8 @@ >> { 'type': 'ChardevFile', 'data': { '*in' : 'ChardevFileSource', >> 'out' : 'ChardevFileSource' } } >> >> -{ 'enum': 'ChardevPortKind', 'data': [ 'tty' ] } >> +{ 'enum': 'ChardevPortKind', 'data': [ 'tty', >> + 'serial' ] } > > Can we just use one name, either tty or serial? Both are in use today, 'serial' on windows and 'tty' on linux. 'tty' on windows doesn't make sense. 'serial' on linux does, but it actually is a subset of 'tty' and needs no special care, thats why I simply aliased it for convenience. We could switch to use 'serial' only for qmp, but I think that will be confusing as the old 'tty' name will have to stay for -chardev. We could just not do the alias thing and continue to use the 'serial' on windows + 'tty' on linux (posix) scheme. > And for the QemuOpts > version, alias them too. Did that ... >> #ifdef HAVE_CHARDEV_TTY >> { .name = "tty", .open = qemu_chr_open_tty }, >> + { .name = "serial", .open = qemu_chr_open_tty }, >> { .name = "pty", .open = qemu_chr_open_pty }, >> #endif ... here. cheers, Gerd