mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 14:15:28 +00:00
qemu: unexport qemuDiskChainCheckBroken
The function isn't used in any other source file. Move it so that it doesn't need a declaration.
This commit is contained in:
parent
22a92eb0a7
commit
00c272421d
@ -2234,6 +2234,28 @@ qemuDomainCheckDiskStartupPolicy(virQEMUDriverPtr driver,
|
||||
return -1;
|
||||
}
|
||||
|
||||
static int
|
||||
qemuDiskChainCheckBroken(virDomainDiskDefPtr disk)
|
||||
{
|
||||
char *brokenFile = NULL;
|
||||
|
||||
if (!virDomainDiskGetSource(disk) || !disk->backingChain)
|
||||
return 0;
|
||||
|
||||
if (virStorageFileChainGetBroken(disk->backingChain, &brokenFile) < 0)
|
||||
return -1;
|
||||
|
||||
if (brokenFile) {
|
||||
virReportError(VIR_ERR_INVALID_ARG,
|
||||
_("Backing file '%s' of image '%s' is missing."),
|
||||
brokenFile, virDomainDiskGetSource(disk));
|
||||
VIR_FREE(brokenFile);
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
qemuDomainCheckDiskPresence(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
@ -2337,28 +2359,6 @@ qemuDomainCleanupRun(virQEMUDriverPtr driver,
|
||||
priv->ncleanupCallbacks_max = 0;
|
||||
}
|
||||
|
||||
int
|
||||
qemuDiskChainCheckBroken(virDomainDiskDefPtr disk)
|
||||
{
|
||||
char *brokenFile = NULL;
|
||||
|
||||
if (!virDomainDiskGetSource(disk) || !disk->backingChain)
|
||||
return 0;
|
||||
|
||||
if (virStorageFileChainGetBroken(disk->backingChain, &brokenFile) < 0)
|
||||
return -1;
|
||||
|
||||
if (brokenFile) {
|
||||
virReportError(VIR_ERR_INVALID_ARG,
|
||||
_("Backing file '%s' of image '%s' is missing."),
|
||||
brokenFile, virDomainDiskGetSource(disk));
|
||||
VIR_FREE(brokenFile);
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void
|
||||
qemuDomainGetImageIds(virQEMUDriverConfigPtr cfg,
|
||||
virDomainObjPtr vm,
|
||||
|
@ -352,8 +352,6 @@ int qemuDomainCheckDiskPresence(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
bool start_with_state);
|
||||
|
||||
int qemuDiskChainCheckBroken(virDomainDiskDefPtr disk);
|
||||
|
||||
int qemuDomainDetermineDiskChain(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
virDomainDiskDefPtr disk,
|
||||
|
Loading…
Reference in New Issue
Block a user