mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-11 15:27:47 +00:00
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:
parent
192cf8ce00
commit
ad8da38e0a
@ -1809,7 +1809,7 @@ qemuBuildDriveDevCacheStr(virDomainDiskDefPtr disk,
|
|||||||
|
|
||||||
|
|
||||||
char *
|
char *
|
||||||
qemuBuildDriveDevStr(const virDomainDef *def,
|
qemuBuildDiskDeviceStr(const virDomainDef *def,
|
||||||
virDomainDiskDefPtr disk,
|
virDomainDiskDefPtr disk,
|
||||||
unsigned int bootindex,
|
unsigned int bootindex,
|
||||||
virQEMUCapsPtr qemuCaps)
|
virQEMUCapsPtr qemuCaps)
|
||||||
@ -2283,7 +2283,7 @@ qemuBuildDiskCommandLine(virCommandPtr cmd,
|
|||||||
} else {
|
} else {
|
||||||
virCommandAddArg(cmd, "-device");
|
virCommandAddArg(cmd, "-device");
|
||||||
|
|
||||||
if (!(optstr = qemuBuildDriveDevStr(def, disk, bootindex,
|
if (!(optstr = qemuBuildDiskDeviceStr(def, disk, bootindex,
|
||||||
qemuCaps)))
|
qemuCaps)))
|
||||||
return -1;
|
return -1;
|
||||||
virCommandAddArg(cmd, optstr);
|
virCommandAddArg(cmd, optstr);
|
||||||
|
@ -110,8 +110,8 @@ qemuBuildStorageSourceAttachPrepareCommon(virStorageSourcePtr src,
|
|||||||
qemuBlockStorageSourceAttachDataPtr data,
|
qemuBlockStorageSourceAttachDataPtr data,
|
||||||
virQEMUCapsPtr qemuCaps);
|
virQEMUCapsPtr qemuCaps);
|
||||||
|
|
||||||
/* Current, best practice */
|
char
|
||||||
char *qemuBuildDriveDevStr(const virDomainDef *def,
|
*qemuBuildDiskDeviceStr(const virDomainDef *def,
|
||||||
virDomainDiskDefPtr disk,
|
virDomainDiskDefPtr disk,
|
||||||
unsigned int bootindex,
|
unsigned int bootindex,
|
||||||
virQEMUCapsPtr qemuCaps);
|
virQEMUCapsPtr qemuCaps);
|
||||||
|
@ -388,7 +388,7 @@ qemuDomainAttachDiskGeneric(virQEMUDriverPtr driver,
|
|||||||
if (qemuBuildStorageSourceAttachPrepareCommon(disk->src, data, priv->qemuCaps) < 0)
|
if (qemuBuildStorageSourceAttachPrepareCommon(disk->src, data, priv->qemuCaps) < 0)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
if (!(devstr = qemuBuildDriveDevStr(vm->def, disk, 0, priv->qemuCaps)))
|
if (!(devstr = qemuBuildDiskDeviceStr(vm->def, disk, 0, priv->qemuCaps)))
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
if (VIR_REALLOC_N(vm->def->disks, vm->def->ndisks + 1) < 0)
|
if (VIR_REALLOC_N(vm->def->disks, vm->def->ndisks + 1) < 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user