From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NKqjX-0003yj-Pr for qemu-devel@nongnu.org; Wed, 16 Dec 2009 05:03:51 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NKqjT-0003xT-FN for qemu-devel@nongnu.org; Wed, 16 Dec 2009 05:03:51 -0500 Received: from [199.232.76.173] (port=34571 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NKqjT-0003xQ-9a for qemu-devel@nongnu.org; Wed, 16 Dec 2009 05:03:47 -0500 Received: from mx1.redhat.com ([209.132.183.28]:15938) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NKqjS-00043q-Om for qemu-devel@nongnu.org; Wed, 16 Dec 2009 05:03:47 -0500 Received: from int-mx05.intmail.prod.int.phx2.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.18]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id nBGA3kK0021177 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 16 Dec 2009 05:03:46 -0500 From: Markus Armbruster Subject: Re: [Qemu-devel] [PATCH] fdc: fix drive property handling. References: <1260889756-26864-1-git-send-email-kraxel@redhat.com> Date: Wed, 16 Dec 2009 11:03:43 +0100 In-Reply-To: <1260889756-26864-1-git-send-email-kraxel@redhat.com> (Gerd Hoffmann's message of "Tue, 15 Dec 2009 16:09:16 +0100") 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 Gerd Hoffmann writes: > Fix the floppy controller init wrappers to set the drive properties > only in case the DriveInfo pointers passed in are non NULL. This allows > to set the properties using -global. > > Signed-off-by: Gerd Hoffmann This fixes "-global isa-fdc,driveB=DRIVE-ID" for me, but problems remain: * Default: dev: isa-fdc, id "" dev-prop: driveA = floppy0 dev-prop: driveB = isa irq 6 * -drive if=none,id=fd,file=fd.img -global isa-fdc.driveA=fd dev: isa-fdc, id "" dev-prop: driveA = floppy0 dev-prop: driveB = isa irq 6 No effect. It works with -nodefaults: dev: isa-fdc, id "" dev-prop: driveA = fd dev-prop: driveB = isa irq 6 * -drive if=none,id=fd,file=fd.img -global isa-fdc.driveB=fd dev: isa-fdc, id "" dev-prop: driveA = floppy0 dev-prop: driveB = fd isa irq 6 Works. -nodefaults works as well: dev: isa-fdc, id "" dev-prop: driveA = dev-prop: driveB = fd isa irq 6 * -drive if=none,id=fd,file=fd.img -global isa-fdc.driveA=fd,driveB=fd Dies, relevant part of stack backtrace: #2 0x006a9092 in abort () from /lib/libc.so.6 #3 0x08128e79 in qdev_prop_set_globals (dev=0x84a6e88) at /home/armbru/work/qemu/hw/qdev-properties.c:622 #4 0x08126632 in qdev_create (bus=0x849a8d0, name=0x81d4354 "isa-fdc") at /home/armbru/work/qemu/hw/qdev.c:106 #5 0x081bf3d9 in isa_create (name=0x81d4354 "isa-fdc") at /home/armbru/work/qemu/hw/isa-bus.c:120 #6 0x08092d83 in fdctrl_init_isa (fds=0xbfffefa0) at /home/armbru/work/qemu/hw/fdc.c:1887 Same with -nodefaults.