The function isn't used in any other source file. Move it so that it
doesn't need a declaration.
---
src/qemu/qemu_domain.c | 44 ++++++++++++++++++++++----------------------
src/qemu/qemu_domain.h | 2 --
2 files changed, 22 insertions(+), 24 deletions(-)
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index cdd4601..1641eed 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -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,
diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h
index b2830c4..31611b5 100644
--- a/src/qemu/qemu_domain.h
+++ b/src/qemu/qemu_domain.h
@@ -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,
--
1.9.1