summaryrefslogtreecommitdiff
path: root/src/df.c
AgeCommit message (Collapse)Author
2000-06-27(show_dev): Round disk usage percentage up, not to nearest value.Jim Meyering
Use integer arithmetic if it's easy. Fix bug when converting twos-complement negative values to floating point.
2000-06-16(df_readable): New arg for rounding style.Jim Meyering
Round negative numbers correctly. (show_dev): Round disk usage up and disk free space down.
2000-06-04(show_point) [HAVE_REALPATH && !HAVE_RESOLVEPATH]:Jim Meyering
Cast undeclared `realpath' to char* to avoid warning.
2000-05-13Arrange to call close_stdout only upon exit.Jim Meyering
2000-03-02(show_point): Ignore shortcuts based on pathJim Meyering
prefixes that are loop file system mount points, since they yield undesirable output.
2000-02-11(main): Count the stat'able arguments.Jim Meyering
Print the header line only if there is at least one valid argument. Reported by Andy Longton <alongton@metamark.com>
2000-01-02(#pragma alloca): Add if _AIX is defined.Jim Meyering
(path-concat.h): Include. (show_point): If HAVE_REALPATH or HAVE_RESOLVEPATH is defined, find the real absolute path for PATH, and use that to find the mount point. (show_point): Prefer non-dummy entries in shortcuts, too. Disable bogus mount dirs instead of restatting them each time.
1999-12-22(ceil_percent): Remove.Jim Meyering
(show_dev): Avoid overflow problems when calculating percent. Do not display negative percents.
1999-12-09(BLOCK_SIZE_OPTION, SYNC_OPTION, NO_SYNC_OPTION): DefineJim Meyering
these and use them instead of `CHAR_MAX + n'.
1999-11-26(df_readable): Now returns char const *, not char *.Jim Meyering
New arg NEGATIVE. (ceil_percent): Now returns double, not int. Be more careful about adding 1 to a wild value. (show_dev): Don't filter out wild sizes from the underlying operating system; instead, show them to the user as faithfully as possible.
1999-09-01Remove declaration of xstrdup.Jim Meyering
1999-08-22(main): Rename locals i and j.Jim Meyering
Use IF_LINT macro instead of #ifdef lint...
1999-07-04(print_header): Conform to POSIX if posix_format).Jim Meyering
(df_readable): Take ceiling if posix_format. (ceil_percent): New function. (show_dev): Take ceiling of percent if posix_format. Align with POSIX-conforming header if posix_format.
1999-05-15(main): When asking for info on an explicit file name,Jim Meyering
just warn rather than failing if the table of mounted filesystems cannot be read.
1999-03-31Don't include closeout.h or version-etc.h explicitly. Now, they're included ↵Jim Meyering
via sys2.h.
1999-03-26No longer include long-options.h.Jim Meyering
Include version-etc.h instead. (PROGRAM_NAME, AUTHORS): Define. [long_options]: Add entries for --help and --version. Remove parse_long_options call. (main) [getopt switch]: Add a case for each of --help and --version.
1999-03-04Include long-options.hJim Meyering
[long_options]: Remove the "help" and "version" entries. (main): Use parse_long_options, including author name(s). Remove the show_version and show_help blocks.
1999-02-16update copyright datesJim Meyering
1999-01-16(usage): Don't make it static so that it can be called from libfu.a by ↵Jim Meyering
xargmatch.
1998-12-07Use dir_name, not dirname. Include dirname.h.Jim Meyering
1998-09-19update bug-reporting addressJim Meyering
1998-09-07(show_dev) [!posix_format]: When using --print-type,Jim Meyering
let the device path and the file system type share a single (wider) field if their combined lengths allow it. From Andries Brouwer.
1998-08-30Don't assume ASCII in getopt arg handling.Jim Meyering
1998-07-29(show_all_fs):Jim Meyering
Revert to boolean value; the old negative value is now in show_local_fs. (show_local_fs): New variable. (show_dev): New args me_dummy and me_class. Use show_local_fs and boolean show_all_fs in combination with these new args to decide whether to show a device. (show_disk): Pass flags to show_dev. (show_point): Use a non-dummy mount entry if possible. (show_all_entries): Pass flags to show_dev. (main): --local sets show_local_fs now. Ask for file system types if show_local_fs is nonzero, since ME_REMOTE might need them. From Paul.
1998-07-25(long_options): Changes table entries not to use this form:Jim Meyering
{"all", no_argument, &show_all_fs, 1}, but rather this form: {"all", no_argument, NULL, 'a'}, Using the latter, all the option handling in one place: the getopt loop.
1998-07-25(show_dev): Omit local devices if show_all_fs is negative.Jim Meyering
(show_all_fs): If negative, omit non-local filesystems. All uses of (all_fs != 0) changed to (all_fs > 0). (long_options, usage, main): Add -l or --local option. (main): When asking for df of an explicit file name, get all the mount points, so that we're more likely to find it when we look it up.
1998-07-13(print_header): Print "1k-blocks", not "1.0k-blocks".Jim Meyering
1998-07-03(df_readable): Rename local so as not to shadow global.Jim Meyering
1998-06-30(main): Move the test of the result of the read_filesystem_list callJim Meyering
up out of if-block -- code in the else-block depends on it too.
1998-06-29revert back to using lower case _unlocked wrapper namesJim Meyering
1998-06-29(human_readable_base, output_units): Remove;Jim Meyering
replace with new variable output_block_size. All uses changed. (long_options, usage, main): Add --block-size. (main, decode_switches): Use new human_block_size function to initialize output block size consistently with other programs. (print_header, show_dev): Shrink some columns and expand others, to squeeze in support for today's larger filesystems. (print_header): Print output block size using power-of-1024 SI format. (df_readable): Coalesce last two args into one, for convenience. All callers changed. (main): Remove check for portable output format and larger or human-readable block sizes. From Paul Eggert.
1998-06-29Change all uses of unlocked-wrapped functions to their upper case wrapper names.Jim Meyering
1998-06-24(show_dev): Increase field width for blocks, used,Jim Meyering
and available columns from 7 to 8.
1998-04-14Use STREQ in string equality tests, not strcmp.Jim Meyering
1998-03-19(show_dev): If fsu_bavail_top_bit_set is nonzero,Jim Meyering
assume the original value corresponding to fsu_bavail was negative.
1998-01-28(print_header): Change format to align heading overJim Meyering
last column of `df -i' output. From Andreas Schwab.
1998-01-14(print_header): Fix inode format header to line it upJim Meyering
with the rest of the output.
1998-01-05(df_readable): New function.Jim Meyering
(show_dev): If a value consists entirely of 1 bits, or is derived from some other value that consists entirely of 1 bits, report "-". Check inode and block counts more carefully for plausibility, to avoid arithmetic overflow when computing percentages.
1998-01-04(main, usage): Check for write error to stdout before exiting.Jim Meyering
Include "closeout.h".
1998-01-03(show_dev): Treat `fsu.fsu_bavail == (unsigned long) -1'Jim Meyering
just like `fsu.fsu_blocks == 0' as an indicator that usage information is invalid. This happens with Solaris-5.5.1 CD-ROM partitions.
1998-01-01(show_dev): Move check for 0-block device (and return ifJim Meyering
not e.g., -a) back up to precede first print stmt.
1997-12-31(show_dev): Print inode counts human readably.Jim Meyering
1997-12-31(show_dev): Move computation ofJim Meyering
blocks_used etc. and blocks_percent_used, inodes_used etc. and inodes_percent_used into respective branches of the `if (inode_format)' statement where they're actually used.
1997-11-30(<inttypes.h>): Include if HAVE_INTTYPES_H.Jim Meyering
("human.h"): Include. (LONGEST_HUMAN_READABLE_1K_BYTE_BLOCKS): Remove. (human_readable_base): Renamed from human_blocks; value is now zero or positive integer, not just zero or nonzero. (output_units): New variable; replaces booleans kilobyte_blocks and megabyte_blocks. (long_options): Add --si or -H. (print_header): Adjust to renamed option variables. (human_readable_1k_blocks): Remove. (show_dev): Count blocks using uintmax_t, not long. Calculate percentages using double, not long; this still isn't perfect as it suffers double rounding, but it's more likely to round correctly in practice than using long did. Adjust to renamed option variables. Use new human_readable library function to format uintmax_t values. (usage): Add -H, --si. (main): Adjust to renamed option variables. Use -H if BLOCKSIZE is SI. Add -H.
1997-10-25Remove old-style xmalloc and xrealloc decls.Jim Meyering
1997-10-07update bug-reporting addressJim Meyering
1997-02-09update copyrights for 1997Jim Meyering
1997-02-02(main): Rename local I to C to avoid shadowing and toJim Meyering
be more consistent. Declare I in inner scopes.
1997-02-01bracket bug address with <> and append a periodJim Meyering
1997-02-01Compare getopt_long return value against -1, not EOF. Use NULL, not '(int ↵Jim Meyering
*) 0' as last parameter in getopt_long call.