]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: process: Fix alias for disk-tray-moved event
authorPeter Krempa <pkrempa@redhat.com>
Mon, 13 Aug 2018 14:11:49 +0000 (16:11 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 21 Aug 2018 13:46:05 +0000 (15:46 +0200)
commit799c8c9bba5a97a3d810aff0f189f754fd22d0ab
tree7916998b65b40d240ba13b0079a39829646628f8
parentcab1843914d9ce5d1ca28477d2b48e5304e9e6f2
qemu: process: Fix alias for disk-tray-moved event

Currently we'd report the alias of the drive which is backing the cdrom
rather than the device itself:

 $ virsh event ds tray-change --loop
 event 'tray-change' for domain ds disk drive-ide0-0-1: opened
 event 'tray-change' for domain ds disk drive-ide0-0-1: closed

Report the disk device alias as we document in the API docs:

https://libvirt.org/html/libvirt-libvirt-domain.html#virConnectDomainEventTrayChangeCallback

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/qemu/qemu_process.c