From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NHd5K-0000XE-N8 for qemu-devel@nongnu.org; Mon, 07 Dec 2009 07:53:02 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NHd5F-0000T8-0C for qemu-devel@nongnu.org; Mon, 07 Dec 2009 07:53:01 -0500 Received: from [199.232.76.173] (port=56357 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NHd5E-0000T1-K9 for qemu-devel@nongnu.org; Mon, 07 Dec 2009 07:52:56 -0500 Received: from cantor2.suse.de ([195.135.220.15]:38459 helo=mx2.suse.de) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NHd5E-0001Kc-9P for qemu-devel@nongnu.org; Mon, 07 Dec 2009 07:52:56 -0500 Mime-Version: 1.0 (Apple Message framework v1077) Content-Type: text/plain; charset=us-ascii From: Alexander Graf In-Reply-To: <1260189773-20728-6-git-send-email-kraxel@redhat.com> Date: Mon, 7 Dec 2009 13:52:49 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: References: <1260189773-20728-1-git-send-email-kraxel@redhat.com> <1260189773-20728-6-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] Re: [FOR 0.12 PATCH v3 05/21] default devices: core code & serial lines. List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: qemu-devel@nongnu.org, lcapitulino@redhat.com On 07.12.2009, at 13:42, Gerd Hoffmann wrote: > Qemu creates a default serial line for you in case you didn't specify > one on the command line. Right now this is tied to the '-serial > ' command line switch, which in turn causes trouble if you = are > creating your serial line via '-device isa-serial,'. >=20 > This patch adds a variable default_serial which says whenever a = default > serial line should be added. It is enabled by default. It is cleared > when qemu finds '-serial' or '-device isa-serial' on the command line. >=20 > Part of the patch is some infrastructure for the '-device $driver' > checking (default_driver_check function) which will also be used by = the > other patches of this series. >=20 > Signed-off-by: Gerd Hoffmann > --- > vl.c | 122 = +++++++++++++++++++++++++++++++++++++++++++---------------------- > 1 files changed, 81 insertions(+), 41 deletions(-) >=20 > diff --git a/vl.c b/vl.c > index 24d5d92..eca4eee 100644 > --- a/vl.c > +++ b/vl.c > @@ -271,6 +271,30 @@ uint8_t qemu_uuid[16]; > static QEMUBootSetHandler *boot_set_handler; > static void *boot_set_opaque; >=20 > +static int default_serial =3D 1; Default variables belong in the machine description IMHO. On S390, we = can't create serial, parallel or vga (or any MMIO/PIO requiring) = devices. Alex=