It's a trivial wrapper around canonicalize_file_name(),
which we need in order to fully mock file access on non-Linux
platforms.
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
virFileActivateDirOverride;
virFileBindMountDevice;
virFileBuildPath;
+virFileCanonicalizePath;
virFileClose;
virFileComparePaths;
virFileCopyACLs;
return cleanpath;
}
+/**
+ * virFileCanonicalizePath:
+ *
+ * Returns the canonical representation of @path.
+ *
+ * The returned string must be freed after use.
+ */
+char *
+virFileCanonicalizePath(const char *path)
+{
+ return canonicalize_file_name(path);
+}
+
/**
* virFileRemoveLastComponent:
*
size_t *nmountsret) ATTRIBUTE_RETURN_CHECK;
char *virFileSanitizePath(const char *path);
+char *virFileCanonicalizePath(const char *path) ATTRIBUTE_NOINLINE;
enum {
VIR_FILE_OPEN_NONE = 0,