]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Common source file change not applicable to open-vm-tools.
authorOliver Kurth <okurth@vmware.com>
Tue, 12 Nov 2019 02:12:23 +0000 (18:12 -0800)
committerOliver Kurth <okurth@vmware.com>
Tue, 12 Nov 2019 02:12:23 +0000 (18:12 -0800)
open-vm-tools/lib/file/filePosix.c

index b4a3cd8576692eb708e0152df9890dc96ae482e4..63e9a85d65a86c078ea31fadbb23724c266fc720 100644 (file)
@@ -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);
 }