From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([209.51.188.92]:58129) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1glgCV-0000BK-Tf for qemu-devel@nongnu.org; Mon, 21 Jan 2019 15:29:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1glgCU-00062y-Uk for qemu-devel@nongnu.org; Mon, 21 Jan 2019 15:29:43 -0500 Date: Mon, 21 Jan 2019 18:29:16 -0200 From: Caio Carrara Message-ID: <20190121202915.GJ17671@localhost.localdomain> References: <20190117185628.21862-1-crosa@redhat.com> <20190117185628.21862-12-crosa@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190117185628.21862-12-crosa@redhat.com> Subject: Re: [Qemu-devel] [PATCH 11/18] scripts/qemu.py: support adding a console with the default serial device List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Cleber Rosa Cc: qemu-devel@nongnu.org, Alex =?iso-8859-1?Q?Benn=E9e?= , Philippe =?iso-8859-1?Q?Mathieu-Daud=E9?= , Stefan Markovic , Aleksandar Markovic , Eduardo Habkost , qemu-s390x@nongnu.org, Aurelien Jarno , Cornelia Huck , Fam Zheng , Wainer dos Santos Moschetta , Aleksandar Rikalo On Thu, Jan 17, 2019 at 01:56:21PM -0500, Cleber Rosa wrote: > The set_console() utility function traditionally adds a device either > based on the explicitly given device type, or based on the machine type, > a known good type of device. > > But, for a number of machine types, it may be impossible or > inconvenient to add the devices my means of "-device" command line > options, and then it may better to just use the "-serial" option and > let QEMU itself, based on the machine type, set the device > accordingly. > > To achieve that, the behavior of set_console() now flags the intention > to add a console device on launch(), and if no explicit device type is > given, and there's no definition on CONSOLE_DEV_TYPES, the "-serial" > is going to be added to the QEMU command line, instead of raising > exceptions. > > Signed-off-by: Cleber Rosa Reviewed-by: Caio Carrara > --- > scripts/qemu.py | 28 +++++++++++++++------------- > 1 file changed, 15 insertions(+), 13 deletions(-) > {...} > -- Caio Carrara Software Engineer, Virt Team - Red Hat ccarrara@redhat.com