From: Kruti Date: Fri, 23 Feb 2024 10:25:09 +0000 (-0800) Subject: Change to common source files not applicable to open-vm-tools. X-Git-Tag: stable-12.4.0~16 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e4f0f9b0d72f583b5129fc8d2b19dd5bb4497d74;p=thirdparty%2Fopen-vm-tools.git Change to common source files not applicable to open-vm-tools. --- diff --git a/open-vm-tools/lib/file/file.c b/open-vm-tools/lib/file/file.c index 0fd2fc3bc..e6b6a52a8 100644 --- a/open-vm-tools/lib/file/file.c +++ b/open-vm-tools/lib/file/file.c @@ -2821,3 +2821,34 @@ File_IsSubPathOf(const char *base, // IN: the base path to test against. return isSubPath; } + +/* + *--------------------------------------------------------------------------- + * + * File_DoesVolumeSupportConvertBlocks -- + * + * Does the volume support the new convert block allocation + * IOCTL? + * + * Results: + * TRUE Yes + * FALSE No + * + * Side effects: + * None + * + *--------------------------------------------------------------------------- + */ + +Bool +File_DoesVolumeSupportConvertBlocks(const char *pathName) // IN: +{ +#if defined(VMX86_SERVER) + uint32 vmfsVersion; + return (File_GetVMFSVersion(pathName, &vmfsVersion) >= 0 && + vmfsVersion >= 6); +#else + UNUSED_VARIABLE(pathName); + return FALSE; +#endif +} diff --git a/open-vm-tools/lib/include/file.h b/open-vm-tools/lib/include/file.h index 15b17891d..726d5c14d 100644 --- a/open-vm-tools/lib/include/file.h +++ b/open-vm-tools/lib/include/file.h @@ -383,6 +383,8 @@ Bool File_DoesVolumeSupportAcls(const char *pathName); Bool File_IsSubPathOf(const char *base, const char *path); +Bool File_DoesVolumeSupportConvertBlocks(const char *pathName); + /* *--------------------------------------------------------------------------- *