On Thu, Jul 30, 2009 at 09:14:07AM +0100, Matthew Booth wrote:
On 29/07/09 15:08, Richard W.M. Jones wrote:
qemu<= 0.10 randomly adds a CD-ROM device to the appliance because of this bit of code:
http://git.savannah.gnu.org/cgit/qemu.git/tree/vl.c?h=stable-0.10#n5495
I'm not convinced this is the right fix. list_devices is supposed to list devices, and for good or ill, the CD-ROM device is present.
If the caller called add_cdrom then the CD-ROM device would be both present _and_ contain media, so it would show up in the list. There's no way that I know of to add a CD-ROM file without media using an explicit qemu command line parameter. AFAIK such devices can only be added by this qemu stupidity.
What is the contract of list_devices supposed to be?
My expectation has been that it would list the devices which were added using add_drive* / add_cdrom calls. Certainly not that it would list those devices, plus some other random devices that qemu pulled out of thin air. We (sorta) enforced this contract by adding an explicit test that this was the case, and this test started to break when we had a version of qemu which was adding its own random CD-ROM device. Rich. -- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones New in Fedora 11: Fedora Windows cross-compiler. Compile Windows programs, test, and build Windows installers. Over 70 libraries supprt'd http://fedoraproject.org/wiki/MinGW http://www.annexia.org/fedora_mingw