From f2d953ec31eeeb3029ca915a55938c538a14efa8 Mon Sep 17 00:00:00 2001 From: Kevin Wolf Date: Thu, 17 Apr 2014 13:27:05 +0200 Subject: block: Catch duplicate IDs in bdrv_new() Since commit f298d071, block devices added with blockdev-add don't have a QemuOpts around in dinfo->opts. Consequently, we can't rely any more on QemuOpts catching duplicate IDs for block devices. This patch adds a new check for duplicate IDs to bdrv_new(), and moves the existing check that the ID isn't already taken for a node-name there as well. Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake --- tests/qemu-iotests/087 | 33 +++++++++++++++++++++++++++++++++ tests/qemu-iotests/087.out | 13 +++++++++++++ 2 files changed, 46 insertions(+) (limited to 'tests') diff --git a/tests/qemu-iotests/087 b/tests/qemu-iotests/087 index a38bb702b3..37d82fcdcd 100755 --- a/tests/qemu-iotests/087 +++ b/tests/qemu-iotests/087 @@ -72,6 +72,39 @@ run_qemu <