qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] fdc: fix drive property handling.


From: Markus Armbruster
Subject: Re: [Qemu-devel] [PATCH] fdc: fix drive property handling.
Date: Wed, 16 Dec 2009 11:03:43 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)

Gerd Hoffmann <address@hidden> 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 <address@hidden>

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 = <null>
            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 = <null>
            isa irq 6

  No effect.  It works with -nodefaults:

          dev: isa-fdc, id ""
            dev-prop: driveA = fd
            dev-prop: driveB = <null>
            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 = <null>
            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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]