From: Kevin Wolf <kwolf@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: [Qemu-devel] Re: [PATCH 3/5] blockdev: Reject multiple definitions for the same drive
Date: Fri, 21 Jan 2011 19:13:58 +0100 [thread overview]
Message-ID: <4D39CCE6.5040702@redhat.com> (raw)
In-Reply-To: <m3zkqu2mgd.fsf@blackfin.pond.sub.org>
Am 21.01.2011 18:30, schrieb Markus Armbruster:
> Kevin Wolf <kwolf@redhat.com> writes:
>
>> Am 21.01.2011 17:58, schrieb Markus Armbruster:
>>> Kevin Wolf <kwolf@redhat.com> writes:
>>>
>>>> Am 17.01.2011 19:31, schrieb Markus Armbruster:
>>>>> For reasons lost in the mist of time, we silently ignore multiple
>>>>> definitions for the same drive:
>>>>>
>>>>> $ qemu-system-x86_64 -nodefaults -vnc :1 -S -monitor stdio -drive if=ide,index=1,file=tmp.qcow2 -drive if=ide,index=1,file=nonexistant
>>>>> QEMU 0.13.50 monitor - type 'help' for more information
>>>>> (qemu) info block
>>>>> ide0-hd1: type=hd removable=0 file=tmp.qcow2 backing_file=tmp.img ro=0 drv=qcow2 encrypted=0
>>>>>
>>>>> With if=none, this can become quite confusing:
>>>>>
>>>>> $ qemu-system-x86_64 -nodefaults -vnc :1 -S -monitor stdio -drive if=none,index=1,file=tmp.qcow2,id=eins -drive if=none,index=1,file=nonexistant,id=zwei -device ide-drive,drive=eins -device ide-drive,drive=zwei
>>>>> qemu-system-x86_64: -device ide-drive,drive=zwei: Property 'ide-drive.drive' can't find value 'zwei'
>>>>>
>>>>> The second -device fails, because it refers to drive zwei, which got
>>>>> silently ignored.
>>>>>
>>>>> Make multiple drive definitions fail cleanly.
>>>>>
>>>>> Signed-off-by: Markus Armbruster <armbru@redhat.com>
>>>>
>>>> Dropped this one (and patch 5, which depends on it) from the block
>>>> branch again, it breaks -cdrom and probably other drives which are
>>>> created by default.
>>>
>>> --verbose?
>>>
>>> I was wondering what crap could depend on the crazy silent ignore...
>>
>> Just try using -cdrom and you'll see yourself.
>
> Works for me. Possibly due to some "it's late on Friday" stupidity on
> my part.
>
>> >From what I understand, we always create the default device. If the user
>> has actually specified one, we still try to create the default device,
>> it fails and that failure was ignored until now (and with the patch
>> applied qemu aborts in this case).
>
> Example command line for the mentally-challenged-on-Fridays?
$ x86_64-softmmu/qemu-system-x86_64 -cdrom /dev/null
qemu-system-x86_64: drive with bus=1, unit=0 (index=2) exists
Kevin
next prev parent reply other threads:[~2011-01-21 18:12 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-17 18:31 [Qemu-devel] [PATCH 0/5] -drive/drive_add fixes Markus Armbruster
2011-01-17 18:31 ` [Qemu-devel] [PATCH 1/5] blockdev: Fix error message for invalid -drive CHS Markus Armbruster
2011-01-17 18:31 ` [Qemu-devel] [PATCH 2/5] blockdev: Make drive_init() use error_report() Markus Armbruster
2011-01-17 18:31 ` [Qemu-devel] [PATCH 3/5] blockdev: Reject multiple definitions for the same drive Markus Armbruster
2011-01-21 14:33 ` [Qemu-devel] " Kevin Wolf
2011-01-21 16:58 ` Markus Armbruster
2011-01-21 17:07 ` Kevin Wolf
2011-01-21 17:30 ` Markus Armbruster
2011-01-21 18:13 ` Kevin Wolf [this message]
2011-01-24 15:36 ` Markus Armbruster
2011-01-17 18:31 ` [Qemu-devel] [PATCH 4/5] blockdev: Fix drive_del not to crash when drive is not in use Markus Armbruster
2011-01-17 18:31 ` [Qemu-devel] [PATCH 5/5] blockdev: Fix drive_add for drives without media Markus Armbruster
2011-01-21 9:08 ` [Qemu-devel] [PATCH 0/5] -drive/drive_add fixes Stefan Hajnoczi
2011-01-21 12:27 ` [Qemu-devel] " Kevin Wolf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4D39CCE6.5040702@redhat.com \
--to=kwolf@redhat.com \
--cc=armbru@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).