*-----------------------------------------------------------------------------
*/
-Bool
+static Bool
FilePosixGetParent(char **canPath) // IN/OUT: Canonical file path
{
char *pathName;
}
-#if !defined(__APPLE__) || TARGET_OS_IPHONE
/*
*----------------------------------------------------------------------
*
return ret;
}
-#endif
#if defined(VMX86_SERVER)
uint64
File_GetCapacity(const char *pathName) // IN: Path name
{
- return File_GetFreeSpace(pathName, FALSE);
+ 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;
}