mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-29 03:21:05 +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
61694a4b3f
commit
1d33c27759
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>
|
2001-02-07 Richard Frith-Macdonald <rfm@gnu.org>
|
||||||
|
|
||||||
* Source/GSFormat.m: merged in some more fixes by Kai.
|
* 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];
|
return [NSDictionary dictionaryWithObjects: values forKeys: keys count: 5];
|
||||||
|
|
||||||
#else
|
#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;
|
struct stat statbuf;
|
||||||
#if HAVE_STATVFS
|
#if HAVE_STATVFS
|
||||||
struct statvfs statfsbuf;
|
struct statvfs statfsbuf;
|
||||||
|
@ -980,7 +980,7 @@ static NSFileManager* defaultManager = nil;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
totalsize = statfsbuf.f_bsize * statfsbuf.f_blocks;
|
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[0] = [NSNumber numberWithLongLong: totalsize];
|
||||||
values[1] = [NSNumber numberWithLongLong: freesize];
|
values[1] = [NSNumber numberWithLongLong: freesize];
|
||||||
|
|
Loading…
Reference in a new issue