Fix detection of disk in IO events

When using -device syntax, the IO event will have a different
prefix, 'drive-' that needs to be skipped over before matching
against the libvirt disk alias

* src/qemu/qemu_driver.c: Skip QEMU_DRIVE_HOST_PREFIX in IO event
This commit is contained in:
Daniel P. Berrange 2010-04-28 15:14:47 +01:00
parent 05776e09fc
commit 0eecdd685a

View File

@ -764,6 +764,9 @@ findDomainDiskByAlias(virDomainObjPtr vm,
{
int i;
if (STRPREFIX(alias, QEMU_DRIVE_HOST_PREFIX))
alias += strlen(QEMU_DRIVE_HOST_PREFIX);
for (i = 0; i < vm->def->ndisks; i++) {
virDomainDiskDefPtr disk;