From 30c3982bda43c5835d5ad582b5c7799cf9109733 Mon Sep 17 00:00:00 2001 From: John Ferlan Date: Mon, 1 Aug 2016 08:26:42 -0400 Subject: [PATCH] qemu: Use qemuAliasFromDisk to generate drive alias The qemuDomainSnapshotCreateSingleDiskActive open coded generating the disk drive alias. Let's use the common function. --- src/qemu/qemu_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 8a8e593ee9..c048cea58c 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -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)))