Document the function and export it for use outside of the 'virfile'
utils module.
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
src/libvirt_private.syms | 1 +
src/util/virfile.c | 12 +++++++++++-
src/util/virfile.h | 2 ++
3 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index d15d6a6a9d..2c8815e4d0 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -2355,6 +2355,7 @@ virFileIsLink;
virFileIsMountPoint;
virFileIsRegular;
virFileIsSharedFS;
+virFileIsSharedFSOverride;
virFileIsSharedFSType;
virFileLength;
virFileLinkPointsTo;
diff --git a/src/util/virfile.c b/src/util/virfile.c
index a8abd7d913..6ac0f4efb3 100644
--- a/src/util/virfile.c
+++ b/src/util/virfile.c
@@ -3804,7 +3804,16 @@ virFileGetDefaultHugepage(virHugeTLBFS *fs,
return NULL;
}
-static bool
+
+/**
+ * virFileIsSharedFSOverride:
+ * @path: Path to check
+ * @overrides: string list of path overrides
+ *
+ * Checks whether @path is inside any of the shared filesystem override
+ * directories passed as @overrides.
+ */
+bool
virFileIsSharedFSOverride(const char *path,
char *const *overrides)
{
@@ -3841,6 +3850,7 @@ virFileIsSharedFSOverride(const char *path,
return false;
}
+
int virFileIsSharedFS(const char *path,
char *const *overrides)
{
diff --git a/src/util/virfile.h b/src/util/virfile.h
index 4f9d2bd5da..e760724037 100644
--- a/src/util/virfile.h
+++ b/src/util/virfile.h
@@ -234,6 +234,8 @@ enum {
VIR_FILE_SHFS_BEEGFS = (1 << 11), /* BeeGFS/fhGFS */
};
+bool virFileIsSharedFSOverride(const char *path,
+ char *const *overrides);
int virFileIsSharedFSType(const char *path, unsigned int fstypes) ATTRIBUTE_NONNULL(1);
int virFileIsSharedFS(const char *path,
char *const *overrides) ATTRIBUTE_NONNULL(1);
--
2.45.2