mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 09:04:13 +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
|
@ -1,3 +1,8 @@
|
|||
2001-02-07 Jonathan Gapen <jagapen@home.com>
|
||||
|
||||
* Source/NSFileManager.m: Make disk space report work on FreeBSD.
|
||||
On all Unix platforms, report disk space available to non-root users.
|
||||
|
||||
2001-02-07 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/GSFormat.m: merged in some more fixes by Kai.
|
||||
|
|
|
@ -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…
Reference in a new issue