(svn r15104) -Codechange: unify the resolving of the xyz kbytes/megabytes strings.

This commit is contained in:
rubidium
2009-01-16 12:59:47 +00:00
parent cdd3676478
commit b1a33a494f
57 changed files with 138 additions and 114 deletions

View File

@@ -87,7 +87,7 @@ void FiosGetDrives()
#endif
}
bool FiosGetDiskFreeSpace(const char *path, uint32 *tot)
bool FiosGetDiskFreeSpace(const char *path, uint64 *tot)
{
#ifndef __INNOTEK_LIBC__
struct diskfree_t free;
@@ -100,14 +100,14 @@ bool FiosGetDiskFreeSpace(const char *path, uint32 *tot)
return false;
#else
uint32 free = 0;
uint64 free = 0;
#ifdef HAS_STATVFS
{
struct statvfs s;
if (statvfs(path, &s) != 0) return false;
free = (uint64)s.f_frsize * s.f_bavail >> 20;
free = (uint64)s.f_frsize * s.f_bavail;
}
#endif
if (tot != NULL) *tot = free;