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:
Peter Krempa 2014-04-15 10:20:07 +02:00
parent 22a92eb0a7
commit 00c272421d
2 changed files with 22 additions and 24 deletions

View File

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

View File

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