Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MxnxI-0003Gu-HO for qemu-devel@nongnu.org; Tue, 13 Oct 2009 16:26:48 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MxnxD-0003CZ-Co for qemu-devel@nongnu.org; Tue, 13 Oct 2009 16:26:47 -0400 Received: from [199.232.76.173] (port=34430 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MxnxD-0003CJ-49 for qemu-devel@nongnu.org; Tue, 13 Oct 2009 16:26:43 -0400 Received: from mx1.redhat.com ([209.132.183.28]:53934) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MxnxC-0000Yi-Om for qemu-devel@nongnu.org; Tue, 13 Oct 2009 16:26:43 -0400 Received: from int-mx03.intmail.prod.int.phx2.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n9DKQfG8013160 for ; Tue, 13 Oct 2009 16:26:41 -0400 Subject: Re: [Qemu-devel] [PATCH] isa: configure serial+parallel by index. References: <1255433919-25736-1-git-send-email-kraxel@redhat.com> From: Markus Armbruster Date: Tue, 13 Oct 2009 21:08:03 +0200 In-Reply-To: <1255433919-25736-1-git-send-email-kraxel@redhat.com> (Gerd Hoffmann's message of "Tue\, 13 Oct 2009 13\:38\:39 +0200") Message-ID: <87zl7v9koc.fsf@pike.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: qemu-devel@nongnu.org Gerd Hoffmann writes: > This patch adds a 'index' property to the isa-parallel and isa-serial > devices. This can be used to create devices with the default isa irqs > and ioports by simply specifying the index, i.e. > > -device isa-serial,index=1 > > instead of > > -device isa-serial,iobase=0x2f8,irq=3 > > for ttyS1 aka com2. Likewise for parallel ports. Not mentioned here, only in the code: * index defaults to 0 for the first device to initialize, 1 for the second, and so forth. * It is okay to overwrite the defaults provided by index, e.g. -device isa-serial,index=1,irq=4 Looks fine to me. A similar solution could do for default mac address.