It builds the string for '-device' from a virDomainDiskDef.
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
src/qemu/qemu_command.c | 12 ++++++------
src/qemu/qemu_command.h | 10 +++++-----
src/qemu/qemu_hotplug.c | 2 +-
3 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 2e5920e859..8c155e7310 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -1809,10 +1809,10 @@ qemuBuildDriveDevCacheStr(virDomainDiskDefPtr disk,
char *
-qemuBuildDriveDevStr(const virDomainDef *def,
- virDomainDiskDefPtr disk,
- unsigned int bootindex,
- virQEMUCapsPtr qemuCaps)
+qemuBuildDiskDeviceStr(const virDomainDef *def,
+ virDomainDiskDefPtr disk,
+ unsigned int bootindex,
+ virQEMUCapsPtr qemuCaps)
{
virBuffer opt = VIR_BUFFER_INITIALIZER;
const char *bus = virDomainDiskQEMUBusTypeToString(disk->bus);
@@ -2283,8 +2283,8 @@ qemuBuildDiskCommandLine(virCommandPtr cmd,
} else {
virCommandAddArg(cmd, "-device");
- if (!(optstr = qemuBuildDriveDevStr(def, disk, bootindex,
- qemuCaps)))
+ if (!(optstr = qemuBuildDiskDeviceStr(def, disk, bootindex,
+ qemuCaps)))
return -1;
virCommandAddArg(cmd, optstr);
VIR_FREE(optstr);
diff --git a/src/qemu/qemu_command.h b/src/qemu/qemu_command.h
index 4452c98e4b..cf17dc1ede 100644
--- a/src/qemu/qemu_command.h
+++ b/src/qemu/qemu_command.h
@@ -110,11 +110,11 @@ qemuBuildStorageSourceAttachPrepareCommon(virStorageSourcePtr src,
qemuBlockStorageSourceAttachDataPtr data,
virQEMUCapsPtr qemuCaps);
-/* Current, best practice */
-char *qemuBuildDriveDevStr(const virDomainDef *def,
- virDomainDiskDefPtr disk,
- unsigned int bootindex,
- virQEMUCapsPtr qemuCaps);
+char
+*qemuBuildDiskDeviceStr(const virDomainDef *def,
+ virDomainDiskDefPtr disk,
+ unsigned int bootindex,
+ virQEMUCapsPtr qemuCaps);
/* Current, best practice */
int qemuBuildControllerDevStr(const virDomainDef *domainDef,
diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index 69f599f575..d22237b86e 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -388,7 +388,7 @@ qemuDomainAttachDiskGeneric(virQEMUDriverPtr driver,
if (qemuBuildStorageSourceAttachPrepareCommon(disk->src, data, priv->qemuCaps)
< 0)
goto error;
- if (!(devstr = qemuBuildDriveDevStr(vm->def, disk, 0, priv->qemuCaps)))
+ if (!(devstr = qemuBuildDiskDeviceStr(vm->def, disk, 0, priv->qemuCaps)))
goto error;
if (VIR_REALLOC_N(vm->def->disks, vm->def->ndisks + 1) < 0)
--
2.16.2