qemu-img: Avoid duplicate block device IDs
commit9ffe333276de8ef463896303fb951f03fd4ffcb4
authorKevin Wolf <kwolf@redhat.com>
Thu, 17 Apr 2014 14:57:13 +0000 (17 16:57 +0200)
committerKevin Wolf <kwolf@redhat.com>
Tue, 22 Apr 2014 10:00:24 +0000 (22 12:00 +0200)
tree8f3c9ad66977488bfcaee0b7630939ce0209a0cf
parent98522f63f40adaebc412481e1d2e9170160d4539
qemu-img: Avoid duplicate block device IDs

qemu-img used to use "image" as ID for all block devices. This means
that e.g. img_convert() ended up with potentially multiple source images
and one target image, all with the same ID. The next patch will catch
this and fail to open the block device.

This patch makes sure that qemu-img uses meaningful unique IDs for the
block devices it uses.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
qemu-img.c