qemu: Use qemuAliasFromDisk to generate drive alias

The qemuDomainSnapshotCreateSingleDiskActive open coded generating the
disk drive alias. Let's use the common function.
This commit is contained in:
John Ferlan 2016-08-01 08:26:42 -04:00
parent f8d49d5b9f
commit 30c3982bda

View File

@ -13806,7 +13806,7 @@ qemuDomainSnapshotCreateSingleDiskActive(virQEMUDriverPtr driver,
return -1;
}
if (virAsprintf(&device, "drive-%s", disk->info.alias) < 0)
if (!(device = qemuAliasFromDisk(disk)))
goto cleanup;
if (!(newDiskSrc = virStorageSourceCopy(snap->src, false)))