Received: from [140.186.70.92] (port=60915 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PgLNX-0000zh-2A for qemu-devel@nongnu.org; Fri, 21 Jan 2011 13:06:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PgLNV-0005xp-Pm for qemu-devel@nongnu.org; Fri, 21 Jan 2011 13:06:30 -0500 Received: from mx1.redhat.com ([209.132.183.28]:61710) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PgLNV-0005xj-G0 for qemu-devel@nongnu.org; Fri, 21 Jan 2011 13:06:29 -0500 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id p0LI6P84004508 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 21 Jan 2011 13:06:28 -0500 From: Markus Armbruster References: <1295289090-18236-1-git-send-email-armbru@redhat.com> <1295289090-18236-4-git-send-email-armbru@redhat.com> <4D399933.3030306@redhat.com> <4D39BD4F.7060805@redhat.com> Date: Fri, 21 Jan 2011 18:30:58 +0100 In-Reply-To: <4D39BD4F.7060805@redhat.com> (Kevin Wolf's message of "Fri, 21 Jan 2011 18:07:27 +0100") Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: [Qemu-devel] Re: [PATCH 3/5] blockdev: Reject multiple definitions for the same drive List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: qemu-devel@nongnu.org Kevin Wolf writes: > Am 21.01.2011 17:58, schrieb Markus Armbruster: >> Kevin Wolf 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 >>> >>> 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?