mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-21 20:15:17 +00:00
qemu: domain: Remove pointless return value in qemuDomainPrepareDiskSourceData
The function does not do anything that could fail. Remove the return value. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
This commit is contained in:
parent
aef87271be
commit
08e0ffe8f5
@ -10379,9 +10379,7 @@ qemuDomainDetermineDiskChain(virQEMUDriverPtr driver,
|
||||
return -1;
|
||||
|
||||
qemuDomainPrepareStorageSourceConfig(n, cfg, priv->qemuCaps);
|
||||
|
||||
if (qemuDomainPrepareDiskSourceData(disk, n) < 0)
|
||||
return -1;
|
||||
qemuDomainPrepareDiskSourceData(disk, n);
|
||||
|
||||
if (virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_BLOCKDEV) &&
|
||||
qemuDomainPrepareStorageSourceBlockdev(disk, n, priv, cfg) < 0)
|
||||
@ -15080,7 +15078,7 @@ qemuDomainCheckCCWS390AddressSupport(const virDomainDef *def,
|
||||
* chain. This function should be also called for detected backing chain
|
||||
* members.
|
||||
*/
|
||||
int
|
||||
void
|
||||
qemuDomainPrepareDiskSourceData(virDomainDiskDefPtr disk,
|
||||
virStorageSourcePtr src)
|
||||
{
|
||||
@ -15095,8 +15093,6 @@ qemuDomainPrepareDiskSourceData(virDomainDiskDefPtr disk,
|
||||
|
||||
if (disk->device == VIR_DOMAIN_DISK_DEVICE_FLOPPY)
|
||||
src->floppyimg = true;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@ -15148,9 +15144,7 @@ qemuDomainPrepareDiskSourceLegacy(virDomainDiskDefPtr disk,
|
||||
return -1;
|
||||
|
||||
qemuDomainPrepareStorageSourceConfig(disk->src, cfg, priv->qemuCaps);
|
||||
|
||||
if (qemuDomainPrepareDiskSourceData(disk, disk->src) < 0)
|
||||
return -1;
|
||||
qemuDomainPrepareDiskSourceData(disk, disk->src);
|
||||
|
||||
if (qemuDomainSecretStorageSourcePrepare(priv, disk->src,
|
||||
disk->info.alias,
|
||||
@ -15184,9 +15178,7 @@ qemuDomainPrepareStorageSourceBlockdev(virDomainDiskDefPtr disk,
|
||||
return -1;
|
||||
|
||||
qemuDomainPrepareStorageSourceConfig(src, cfg, priv->qemuCaps);
|
||||
|
||||
if (qemuDomainPrepareDiskSourceData(disk, src) < 0)
|
||||
return -1;
|
||||
qemuDomainPrepareDiskSourceData(disk, src);
|
||||
|
||||
if (qemuDomainSecretStorageSourcePrepare(priv, src,
|
||||
src->nodestorage,
|
||||
|
@ -1169,10 +1169,9 @@ qemuDomainCheckCCWS390AddressSupport(const virDomainDef *def,
|
||||
virQEMUCapsPtr qemuCaps,
|
||||
const char *devicename);
|
||||
|
||||
int
|
||||
void
|
||||
qemuDomainPrepareDiskSourceData(virDomainDiskDefPtr disk,
|
||||
virStorageSourcePtr src)
|
||||
G_GNUC_WARN_UNUSED_RESULT;
|
||||
virStorageSourcePtr src);
|
||||
|
||||
|
||||
int
|
||||
|
@ -222,8 +222,7 @@ testQemuDiskXMLToProps(const void *opaque)
|
||||
if (qemuDomainValidateStorageSource(n, data->qemuCaps) < 0)
|
||||
goto cleanup;
|
||||
|
||||
if (qemuDomainPrepareDiskSourceData(disk, n) < 0)
|
||||
goto cleanup;
|
||||
qemuDomainPrepareDiskSourceData(disk, n);
|
||||
|
||||
if (!(formatProps = qemuBlockStorageSourceGetBlockdevProps(n, n->backingStore)) ||
|
||||
!(storageSrcOnlyProps = qemuBlockStorageSourceGetBackendProps(n, false, true, true)) ||
|
||||
|
Loading…
x
Reference in New Issue
Block a user