提交 912dc56d 编写于 作者: P Peter Krempa

qemu: Remove unused argument 'bootable' from qemuBuildDriveStr

Now that the argument is unused we can remove it transitively from all
the call graphs.
Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
Reviewed-by: NJán Tomko <jtomko@redhat.com>
上级 a0ff9fbe
...@@ -1632,7 +1632,6 @@ qemuBuildDiskFrontendAttributes(virDomainDiskDefPtr disk, ...@@ -1632,7 +1632,6 @@ qemuBuildDiskFrontendAttributes(virDomainDiskDefPtr disk,
static char * static char *
qemuBuildDriveStr(virDomainDiskDefPtr disk, qemuBuildDriveStr(virDomainDiskDefPtr disk,
bool bootable ATTRIBUTE_UNUSED,
virQEMUCapsPtr qemuCaps) virQEMUCapsPtr qemuCaps)
{ {
virBuffer opt = VIR_BUFFER_INITIALIZER; virBuffer opt = VIR_BUFFER_INITIALIZER;
...@@ -2244,14 +2243,12 @@ qemuBuildBlockStorageSourceAttachDataCommandline(virCommandPtr cmd, ...@@ -2244,14 +2243,12 @@ qemuBuildBlockStorageSourceAttachDataCommandline(virCommandPtr cmd,
static int static int
qemuBuildDiskSourceCommandLine(virCommandPtr cmd, qemuBuildDiskSourceCommandLine(virCommandPtr cmd,
virDomainDiskDefPtr disk, virDomainDiskDefPtr disk,
virQEMUCapsPtr qemuCaps, virQEMUCapsPtr qemuCaps)
bool driveBoot)
{ {
qemuBlockStorageSourceAttachDataPtr data = NULL; qemuBlockStorageSourceAttachDataPtr data = NULL;
int ret = -1; int ret = -1;
if (!(data = qemuBuildStorageSourceAttachPrepareDrive(disk, qemuCaps, if (!(data = qemuBuildStorageSourceAttachPrepareDrive(disk, qemuCaps)))
driveBoot)))
return -1; return -1;
if (qemuBuildStorageSourceAttachPrepareCommon(disk->src, data, qemuCaps) < 0 || if (qemuBuildStorageSourceAttachPrepareCommon(disk->src, data, qemuCaps) < 0 ||
...@@ -2271,12 +2268,11 @@ qemuBuildDiskCommandLine(virCommandPtr cmd, ...@@ -2271,12 +2268,11 @@ qemuBuildDiskCommandLine(virCommandPtr cmd,
const virDomainDef *def, const virDomainDef *def,
virDomainDiskDefPtr disk, virDomainDiskDefPtr disk,
virQEMUCapsPtr qemuCaps, virQEMUCapsPtr qemuCaps,
unsigned int bootindex, unsigned int bootindex)
bool driveBoot)
{ {
char *optstr; char *optstr;
if (qemuBuildDiskSourceCommandLine(cmd, disk, qemuCaps, driveBoot) < 0) if (qemuBuildDiskSourceCommandLine(cmd, disk, qemuCaps) < 0)
return -1; return -1;
if (!qemuDiskBusNeedsDriveArg(disk->bus)) { if (!qemuDiskBusNeedsDriveArg(disk->bus)) {
...@@ -2326,7 +2322,6 @@ qemuBuildDisksCommandLine(virCommandPtr cmd, ...@@ -2326,7 +2322,6 @@ qemuBuildDisksCommandLine(virCommandPtr cmd,
for (i = 0; i < def->ndisks; i++) { for (i = 0; i < def->ndisks; i++) {
virDomainDiskDefPtr disk = def->disks[i]; virDomainDiskDefPtr disk = def->disks[i];
unsigned int bootindex = 0; unsigned int bootindex = 0;
bool driveBoot = false;
if (disk->info.bootIndex) { if (disk->info.bootIndex) {
bootindex = disk->info.bootIndex; bootindex = disk->info.bootIndex;
...@@ -2349,7 +2344,7 @@ qemuBuildDisksCommandLine(virCommandPtr cmd, ...@@ -2349,7 +2344,7 @@ qemuBuildDisksCommandLine(virCommandPtr cmd,
} }
if (qemuBuildDiskCommandLine(cmd, def, disk, qemuCaps, if (qemuBuildDiskCommandLine(cmd, def, disk, qemuCaps,
bootindex, driveBoot) < 0) bootindex) < 0)
return -1; return -1;
} }
...@@ -10691,15 +10686,14 @@ qemuBuildHotpluggableCPUProps(const virDomainVcpuDef *vcpu) ...@@ -10691,15 +10686,14 @@ qemuBuildHotpluggableCPUProps(const virDomainVcpuDef *vcpu)
*/ */
qemuBlockStorageSourceAttachDataPtr qemuBlockStorageSourceAttachDataPtr
qemuBuildStorageSourceAttachPrepareDrive(virDomainDiskDefPtr disk, qemuBuildStorageSourceAttachPrepareDrive(virDomainDiskDefPtr disk,
virQEMUCapsPtr qemuCaps, virQEMUCapsPtr qemuCaps)
bool driveBoot)
{ {
qemuBlockStorageSourceAttachDataPtr data = NULL; qemuBlockStorageSourceAttachDataPtr data = NULL;
if (VIR_ALLOC(data) < 0) if (VIR_ALLOC(data) < 0)
return NULL; return NULL;
if (!(data->driveCmd = qemuBuildDriveStr(disk, driveBoot, qemuCaps)) || if (!(data->driveCmd = qemuBuildDriveStr(disk, qemuCaps)) ||
!(data->driveAlias = qemuAliasDiskDriveFromDisk(disk))) { !(data->driveAlias = qemuAliasDiskDriveFromDisk(disk))) {
qemuBlockStorageSourceAttachDataFree(data); qemuBlockStorageSourceAttachDataFree(data);
return NULL; return NULL;
......
...@@ -103,8 +103,7 @@ bool qemuDiskBusNeedsDriveArg(int bus); ...@@ -103,8 +103,7 @@ bool qemuDiskBusNeedsDriveArg(int bus);
qemuBlockStorageSourceAttachDataPtr qemuBlockStorageSourceAttachDataPtr
qemuBuildStorageSourceAttachPrepareDrive(virDomainDiskDefPtr disk, qemuBuildStorageSourceAttachPrepareDrive(virDomainDiskDefPtr disk,
virQEMUCapsPtr qemuCaps, virQEMUCapsPtr qemuCaps);
bool driveBoot);
int int
qemuBuildStorageSourceAttachPrepareCommon(virStorageSourcePtr src, qemuBuildStorageSourceAttachPrepareCommon(virStorageSourcePtr src,
qemuBlockStorageSourceAttachDataPtr data, qemuBlockStorageSourceAttachDataPtr data,
......
...@@ -509,7 +509,7 @@ qemuHotplugDiskSourceAttachPrepare(virDomainDiskDefPtr disk, ...@@ -509,7 +509,7 @@ qemuHotplugDiskSourceAttachPrepare(virDomainDiskDefPtr disk,
if (VIR_ALLOC(data) < 0) if (VIR_ALLOC(data) < 0)
return NULL; return NULL;
if (!(backend = qemuBuildStorageSourceAttachPrepareDrive(disk, qemuCaps, false))) if (!(backend = qemuBuildStorageSourceAttachPrepareDrive(disk, qemuCaps)))
goto cleanup; goto cleanup;
if (qemuBuildStorageSourceAttachPrepareCommon(disk->src, backend, qemuCaps) < 0) if (qemuBuildStorageSourceAttachPrepareCommon(disk->src, backend, qemuCaps) < 0)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册