qemu: command: Rename qemuBuildDriveDevStr to qemuBuildDiskDeviceStr

It builds the string for '-device' from a virDomainDiskDef.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Peter Krempa 2018-07-10 10:41:04 +02:00
parent 192cf8ce00
commit ad8da38e0a
3 changed files with 12 additions and 12 deletions

View File

@ -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);

View File

@ -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,

View File

@ -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)