aboutsummaryrefslogtreecommitdiff
path: root/blockdev.c
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2014-04-17 13:27:05 +0200
committerKevin Wolf <kwolf@redhat.com>2014-04-22 12:00:28 +0200
commitf2d953ec31eeeb3029ca915a55938c538a14efa8 (patch)
treecdf3f33ebe91969f843d784e03c798ef80d6fad8 /blockdev.c
parent9ffe333276de8ef463896303fb951f03fd4ffcb4 (diff)
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 <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'blockdev.c')
-rw-r--r--blockdev.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/blockdev.c b/blockdev.c
index 3a11a62019..09826f10cf 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -452,12 +452,6 @@ static DriveInfo *blockdev_init(const char *file, QDict *bs_opts,
}
}
- if (bdrv_find_node(qemu_opts_id(opts))) {
- error_setg(errp, "device id=%s is conflicting with a node-name",
- qemu_opts_id(opts));
- goto early_err;
- }
-
/* init */
dinfo = g_malloc0(sizeof(*dinfo));
dinfo->id = g_strdup(qemu_opts_id(opts));