lib/fsusage.c


Log

Author Commit Date CI Message
Jim Meyering b4f3281d 2003-06-06T19:45:59 Merge from coreutils. Remove declaration of statfs. It conflicted with one from OSF/1 5.1 in <sys/mount.h>.
Paul Eggert 552a680f 2003-05-29T07:21:59 in lib: * addext.c, backupfile.c, fsusage.c, human.c, pathmax.h, rpmatch.c, userspec.c, xreadlink.c, xstrtol.c: Include <limits.h> without checking for HAVE_LIMITS_H. * backupfile.c, fsusage.c, hash.c, human.c, safe-read.c, userspec.c, xstrtol.c (CHAR_BIT) : Don't define, since <limits.h> is guaranteed to do that. * fatal.c: Include <stdarg.h> without checking for __STDC__. * exclude.c: Include <stdbool.h> unconditionally. * tempname.c: Include <stddef.h> unconditionally. * hash.c: Include <limits.h>, since we no longer define CHAR_BIT. * modechange.c, rpmatch.c (NULL): Don't define, since <stddef.h> does that. * quote.c: Dont include <stddef.h> or <sys/types.h>; not needed. * safe-read.c (INT_MAX): Don't define, since <limits.h> does that. * safe-read.c (TYPE_MINIMUM, TYPE_MAXIMUM): Remove; no longer needed. * xstrtol.c: Likewise. * safe-read.c: Remove TYPE_SIGNED; no longer needed. * savedir.c: Include <stddef.h> instead of defining NULL. in m4: * backupfile.m4 (gl_BACKUPFILE): Don't check for limits.h. * fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Likewise. * human.m4 (gl_HUMAN): Likewise. * pathmax.m4 (gl_PATHMAX): Likewise. * rpmatch.m4 (gl_FUNC_RPMATCH): Likewise. * userspec.m4 (gl_USERSPEC): Likewise. * xreadlink.m4 (gl_XREADLINK): Likewise. * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise. * quote.m4 (gl_QUOTE): Don't check for stddef.h.
Bruno Haible d32523a5 2002-12-17T11:48:24 Use full_read instead of safe_read.
Jim Meyering 29c76c33 2002-11-23T15:08:35 Remove unneeded parentheses around operands of `defined'.
Jim Meyering 427baafb 2002-11-21T13:22:51 2002-09-25 Paul Eggert <eggert@twinsun.com> [! HAVE_INTTYPES_H && HAVE_STDINT_H] Include <stdint.h>. (UINTMAX_MAX) [!defined UINTMAX_MAX]: New macro. (PROPAGATE_ALL_ONES): Work even if X is unsigned and narrower than int. Work more efficiently if X is the same width as uintmax_t. Do not compare X to -1, to avoid bogus compiler warning. (get_fs_usage): (uintmax_t) -1 -> UINTMAX_MAX to avoid a cast. Don't assume that f_frsize and f_bsize are the same type.
Jim Meyering 89f2b489 2000-08-07T15:48:18 back out Copyright date changes for files with no changes year
Jim Meyering d349992d 2000-07-09T07:22:43 update copyright date
Jim Meyering eab7ca83 1999-07-15T07:50:06 (get_fs_usage) [STATFS_TRUNCATES_BLOCK_COUNTS]: Work around SunOS botch also when block size is different from 1k.
Jim Meyering cf42d3e5 1998-12-07T03:12:10 ansideclify
Jim Meyering 769d477a 1998-03-19T22:18:04 Include <limits.h>. (CHAR_BIT, EXTRACT_TOP_BIT, PROPAGATE_TOP_BIT): New macros. (get_fs_usage): If top bit of system variable corresponding to fsu_bavail is set, then set fsu_bavail_top_bit_set, and sign-extend the value when storing it into fsu_bavail.
Jim Meyering 447637a2 1998-01-05T17:38:38 (get_fs_usage): Add parens.
Jim Meyering 86e7bdec 1998-01-05T17:33:54 (PROPAGATE_ALL_ONES): New macro. (get_fs_usage): If a value consists entirely of 1 bits, propagate this info to the output by setting it to (uintmax_t) -1.
Jim Meyering b8442ced 1997-11-30T10:24:24 Do all calculations using uintmax_t. Include <inttypes.h> if available. (adjust_blocks, CONVERT_BLOCKS): Remove. (get_fs_usage): Set new member fsu_blocksize, and do not convert numbers to 512-byte block units; this avoids overflow here. Cast lseek arg to off_t, not long.
Jim Meyering 4b7e5ff7 1996-11-28T19:37:01 (get_fs_usage): If DISK is 0 and we needed to use it, return -1 with 0 in ERRNO. From Miles.
Jim Meyering 03703081 1996-11-05T03:38:23 libitize
Jim Meyering d654ce2d 1996-11-03T23:53:51 cpp-indent + change some #ifdef to #if
Jim Meyering 60713ffa 1996-08-02T03:25:10 (get_fs_usage) [STAT_STATFS4] [_CRAY]: Define f_bavail to f_bfree. From by Johan Danielsson.
Jim Meyering 8d53f755 1996-07-31T04:43:59 [HAVE_SYS_FS_S5PARAM_H]: Include sys/fs/s5param.h to work around bug in sys/filsys.h of Fujitsu UXP/V. Reported by Johan Danielsson.
Jim Meyering 6d8337bf 1996-07-15T03:36:16 update FSF address in copyright
Jim Meyering 7d358b25 1996-05-23T13:04:03 [_CRAY]: Don't include sys/filsys.h because although Unicos-9 has it, it's not needed and would cause other problems because it requires inclusion of other, non-standard headers.
Jim Meyering ff5d019a 1996-05-17T03:16:34 (get_fs_usage): Declare parameter PATH to be const.
Jim Meyering e2c518e9 1995-10-01T22:49:07 Remove trailing whitespace.
Jim Meyering 799b98ef 1995-10-01T18:23:29 (get_fs_usage) [STATFS_TRUNCATES_BLOCK_COUNTS]: Copy untruncated block counts from f_spare array into proper members of struct statfs. From Eirik Fuller (eirik@netapp.com);
Jim Meyering 47a70ed9 1995-05-19T15:23:18 No longer include safe-l?stat.h.
Jim Meyering 63f4e38f 1995-05-13T13:06:46 (statfs): Use stat, not safe_stat.
Jim Meyering 849c4387 1995-01-27T17:20:54 (get_fs_usage, statfs): Use safe_read, and safe_stat rather than bare read and stat.
Jim Meyering 535ad0d1 1994-10-29T05:06:43 .
Jim Meyering d01d0a85 1994-10-27T13:44:07 merge with 3.9s
Jim Meyering 9d684924 1994-10-08T14:52:10 .
Jim Meyering 2f17b5a8 1994-10-08T02:04:47 .
Jim Meyering 300424a2 1994-10-02T05:43:03 merge with 3.9h
Jim Meyering 68eb0d90 1994-07-30T13:13:52 Use SAFE_STAT instead of stat to avoid unnecessary failure on systems for which stat can return EINTR.
Jim Meyering 456b8699 1994-03-16T14:47:59 (adjust_blocks): Code it as a function again.
Jim Meyering c4a3a40b 1994-03-16T14:32:26 .
Jim Meyering 90bc7be6 1994-03-14T16:24:52 .
Jim Meyering e0be8461 1994-03-14T14:54:14 .
Jim Meyering a89ae060 1993-10-12T20:24:09 merge with 3.8.4c
Jim Meyering 435871aa 1993-10-09T20:43:31 merge with 3.8.3e
Jim Meyering 92a0e357 1993-10-06T16:44:42 merge with 3.8.3b
Jim Meyering de7ba135 1993-10-06T00:24:28 merge with 3.8.3a
Jim Meyering e988749c 1993-08-26T04:38:45 merge with 3.8.2
Jim Meyering 3773b1cc 1993-05-22T02:09:21 merge with 3.5.5
Jim Meyering d305484f 1993-04-15T01:58:35 merge with 3.4.7
Jim Meyering b0657895 1993-03-29T05:09:24 merge with 3.4.1
Jim Meyering b0177875 1992-10-31T22:50:51 (adjust_blocks): Convert to a macro. The static function wasn't always used.
Jim Meyering d87c3946 1992-10-31T20:42:48 Initial revision