X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Ffsusage.c;h=0dff85c0abfcd91bc1e5a4184bf12135debc8c02;hb=2957c7e48ca78d82df43b32427c66671c8c0e1d2;hp=1853d67f37e25119a8c0271ca7c78a6a9855a476;hpb=769d477a68562d1988decb50318c306a5611a5a8;p=gnulib.git diff --git a/lib/fsusage.c b/lib/fsusage.c index 1853d67f3..0dff85c0a 100644 --- a/lib/fsusage.c +++ b/lib/fsusage.c @@ -1,5 +1,5 @@ /* fsusage.c -- return space usage of mounted filesystems - Copyright (C) 1991, 1992, 1996, 1998 Free Software Foundation, Inc. + Copyright (C) 1991, 1992, 1996, 1998, 1999, 2000 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -101,10 +101,7 @@ int safe_read (); ERRNO is either a system error value, or zero if DISK is NULL on a system that requires a non-NULL value. */ int -get_fs_usage (path, disk, fsp) - const char *path; - const char *disk; - struct fs_usage *fsp; +get_fs_usage (const char *path, const char *disk, struct fs_usage *fsp) { #ifdef STAT_STATFS3_OSF1 @@ -187,7 +184,7 @@ get_fs_usage (path, disk, fsp) truncation, presumably without botching the 4.1.1 case, in which the values are not truncated. The correct counts are stored in undocumented spare fields. */ - if (fsd.f_blocks == 0x1fffff && fsd.f_spare[0] > 0) + if (fsd.f_blocks == 0x7fffffff / fsd.f_bsize && fsd.f_spare[0] > 0) { fsd.f_blocks = fsd.f_spare[0]; fsd.f_bfree = fsd.f_spare[1]; @@ -262,9 +259,7 @@ get_fs_usage (path, disk, fsp) /* AIX PS/2 does not supply statfs. */ int -statfs (path, fsb) - char *path; - struct statfs *fsb; +statfs (char *path, struct statfs *fsb) { struct stat stats; struct dustat fsd;