]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: domain: Store whether a virStorageSource is a host CDROM drive
authorPeter Krempa <pkrempa@redhat.com>
Tue, 24 Apr 2018 14:59:00 +0000 (16:59 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 7 May 2018 13:22:30 +0000 (15:22 +0200)
commite5dc760d0c48965a282cbd0699d399b615aebfd5
treeaa8d9f9c731d887d73a77c46d3e3242d6dfa6888
parentf3282d1f9b677f1bb41e084af3972a73f93a77eb
qemu: domain: Store whether a virStorageSource is a host CDROM drive

Use virFileIsCDROM to detect whether a block device is a cdrom drive and
store it in virStorageSource. This will be necessary to correctly create
the 'host_cdrom' backend in qemu when using -blockdev.

We assume that host_cdrom makes only sense when used directly as a raw
image, but if a backing chain would be put in front of it, libvirt will
use 'host_device' in that case.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
src/qemu/qemu_domain.c
src/util/virstoragefile.h