mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 00:11:26 +00:00
Free disk space reporting fixes.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@9039 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
e8cf2df164
commit
087c35f0f9
2 changed files with 7 additions and 2 deletions
|
@ -949,7 +949,7 @@ static NSFileManager* defaultManager = nil;
|
|||
return [NSDictionary dictionaryWithObjects: values forKeys: keys count: 5];
|
||||
|
||||
#else
|
||||
#if HAVE_SYS_VFS_H || HAVE_SYS_STATFS_H
|
||||
#if HAVE_SYS_VFS_H || HAVE_SYS_STATFS_H || HAVE_SYS_MOUNT_H
|
||||
struct stat statbuf;
|
||||
#if HAVE_STATVFS
|
||||
struct statvfs statfsbuf;
|
||||
|
@ -980,7 +980,7 @@ static NSFileManager* defaultManager = nil;
|
|||
#endif
|
||||
|
||||
totalsize = statfsbuf.f_bsize * statfsbuf.f_blocks;
|
||||
freesize = statfsbuf.f_bsize * statfsbuf.f_bfree;
|
||||
freesize = statfsbuf.f_bsize * statfsbuf.f_bavail;
|
||||
|
||||
values[0] = [NSNumber numberWithLongLong: totalsize];
|
||||
values[1] = [NSNumber numberWithLongLong: freesize];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue