summaryrefslogtreecommitdiff
path: root/src/df.c
AgeCommit message (Collapse)Author
2002-11-08(print_header): Use primitives from inttostr.h, notJim Meyering
human.h, to print large numbers simply. (human_output_opts): New var. (output_block_size): Now uintmax_t, not int, to handle larger block sizes. All uses changed. (print_header): In the header line, prefer SI to human representation if it's shorter; if neither is shorter, try to intuit what the user would prefer.
2002-10-03Mark translatable string with `N_ (...)'.Jim Meyering
2002-09-22Remove all inclusions of inttypes.h,Jim Meyering
since it's already included from sys2.h via system.h.
2002-08-31Change `exit (0)' to `exit (EXIT_SUCCESS)',Jim Meyering
`exit (1)' to `exit (EXIT_FAILURE)', and `usage (1)' to `usage (EXIT_FAILURE)'.
2002-07-10(show_dev): Make the `Use%' column align withJim Meyering
its heading, even when -P is used with -h or -H.
2002-07-08df now rounds all quantities up, as per POSIX.Jim Meyering
This fixes a bug where df would report Size < Used. (df_readable): Omit last arg; we always round up now. All callers changed.
2002-07-02(usage): Use the PACKAGE_BUGREPORT e-mail address, rather than hard-coding it.Jim Meyering
2001-12-21(BLOCK_SIZE_OPTION): Remove; no longer needed now that we have 'B'.Jim Meyering
(long_options, usage, main): Add -B. (usage): Deprecate --kilobytes, -m, --megabytes. Document size suffixes. (print_header, show_dev): Enlarge column widths for trailing "B".
2001-12-02Use new macros, HELP_OPTION_DESCRIPTION and VERSION_OPTION_DESCRIPTIONJim Meyering
instead of hard-coding --help and --version descriptions.
2001-11-23(usage): Note that ``Mandatory arguments to long options are mandatoryJim Meyering
for short options too.''
2001-11-23(usage): Split --help output into smaller pieces.Jim Meyering
Use fputs, not printf.
2001-09-01(show_point): Use canonicalize_file_name, if possible.Jim Meyering
[HAVE_RESOLVEPATH], [!HAVE_RESOLVEPATH]: Use malloc, not alloca, so that these two paths also produce `resolved' in malloc'd storage. Free that memory when done with it.
2001-05-12(strip_trailing_slashes): Likewise.Jim Meyering
(find_mount_point): No need to strip trailing slashes before invoking new dir_name.
2000-11-23(show_point): Before accepting an entry as a match, make sure thatJim Meyering
the mount directory exists and has the required device number. Before, e.g., `df /floppy' would mistakenly report on the root partition if /floppy were not listed in /etc/mtab but / was. Patch from Eirik Fuller (http://bugs.debian.org/76923).
2000-11-06(print_header): Mark strings for translation.Jim Meyering
2000-07-30Convert "`%s'" in format strings to "%s", and wrap eachJim Meyering
corresponding argument in a `quote (...)' call.
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