From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N2LN9-000460-0v for qemu-devel@nongnu.org; Mon, 26 Oct 2009 04:56:15 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N2LN4-000459-5h for qemu-devel@nongnu.org; Mon, 26 Oct 2009 04:56:14 -0400 Received: from [199.232.76.173] (port=54527 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N2LN3-000456-Tg for qemu-devel@nongnu.org; Mon, 26 Oct 2009 04:56:09 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37271) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1N2LN3-0008RO-Dy for qemu-devel@nongnu.org; Mon, 26 Oct 2009 04:56:09 -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 n9Q8u7QN018539 for ; Mon, 26 Oct 2009 04:56:07 -0400 From: Markus Armbruster Subject: Re: [Qemu-devel] [PATCH] isa: configure serial+parallel by index. References: <1255433919-25736-1-git-send-email-kraxel@redhat.com> <87zl7v9koc.fsf@pike.pond.sub.org> Date: Mon, 26 Oct 2009 09:56:05 +0100 In-Reply-To: <87zl7v9koc.fsf@pike.pond.sub.org> (Markus Armbruster's message of "Tue, 13 Oct 2009 21:08:03 +0200") Message-ID: 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 Markus Armbruster writes: > 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. One little thing I missed on first reading: making an index property hexadecimal is weird. I'd really expect decimal there.