From: Oliver Kurth Date: Tue, 12 Nov 2019 02:12:23 +0000 (-0800) Subject: Common source file change not applicable to open-vm-tools. X-Git-Tag: stable-11.1.0~150 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3d6b350477a031fda825325a5013dd76a641e426;p=thirdparty%2Fopen-vm-tools.git Common source file change not applicable to open-vm-tools. --- diff --git a/open-vm-tools/lib/file/filePosix.c b/open-vm-tools/lib/file/filePosix.c index b4a3cd857..63e9a85d6 100644 --- a/open-vm-tools/lib/file/filePosix.c +++ b/open-vm-tools/lib/file/filePosix.c @@ -989,7 +989,7 @@ File_SetFilePermissions(const char *pathName, // IN: *----------------------------------------------------------------------------- */ -static Bool +Bool FilePosixGetParent(char **canPath) // IN/OUT: Canonical file path { char *pathName; @@ -1046,6 +1046,7 @@ File_GetParent(char **canPath) // IN/OUT: Canonical file path } +#if !defined(__APPLE__) /* *---------------------------------------------------------------------- * @@ -1137,6 +1138,7 @@ File_GetFreeSpace(const char *pathName, // IN: File name return ret; } +#endif #if defined(VMX86_SERVER) @@ -1619,25 +1621,7 @@ File_SupportsOptimisticLock(const char *pathName) // IN: uint64 File_GetCapacity(const char *pathName) // IN: Path name { - uint64 ret; - char *fullPath; - struct statfs statfsbuf; - - fullPath = File_FullPath(pathName); - if (fullPath == NULL) { - return -1; - } - - if (FileGetStats(fullPath, FALSE, &statfsbuf)) { - ret = (uint64) statfsbuf.f_blocks * statfsbuf.f_bsize; - } else { - Warning(LGPFX" %s: Couldn't statfs\n", __func__); - ret = -1; - } - - Posix_Free(fullPath); - - return ret; + return File_GetFreeSpace(pathName, FALSE); }