]> xenbits.xensource.com Git - libvirt.git/commit
qemu: hotplug: Don't try to setup disk image when hotplugging empty cdrom drive
authorPeter Krempa <pkrempa@redhat.com>
Tue, 21 Nov 2023 13:59:37 +0000 (14:59 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Thu, 23 Nov 2023 13:31:05 +0000 (14:31 +0100)
commit894c6c5c1686cfbc1742493ed512a4795098b763
tree674c0ace6c12ab5e4b2af4bf4cb6262891e96d14
parentfe42189d760a91dede82b06cfac77d4b799ff117
qemu: hotplug: Don't try to setup disk image when hotplugging empty cdrom drive

Originally the disk hotplug code didn't know how to attach a CD-ROM
drive, thus didn't have the necessary logic to handle empty cdroms.

Other disks can't be empty which is enforced by the parser validation
logic.

When support for hotplugging cdroms was added the code was not adjusted
to deal with empty drives thus attempted to setup the blockdev backend
for it.

Fixes: 3078799fef82d45ac10624e3bacded7a285d8a4f
Resolves: https://issues.redhat.com/browse/RHEL-16870
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/qemu/qemu_hotplug.c