summaryrefslogtreecommitdiff
path: root/src/df.c
AgeCommit message (Collapse)Author
2006-07-25* src/df.c (n_valid_args): Declare global to be static.Jim Meyering
2006-07-20* src/df.c (main): Fail and don't print the headers if noJim Meyering
file system is processed. This makes it easy to test whether a specified directory is on a file system of a given type or types. Otherwise, applications would have had to parse df's output. E.g., is "." either ext3 or reiserfs: df -t ext3 -t reiserfs .
2006-01-24(show_dev): If the file system claims to have more available than totalPaul Eggert
blocks, report the number of used blocks as being total - available (a negative number) rather than as garbage.
2005-12-28Don't include <assert.h>; it wasn't used.Jim Meyering
2005-11-26(show_point): Ignore inaccessible file systems.Paul Eggert
(usage): -a includes dummy file systems, not size-0 file systems.
2005-10-15(main): Warn about the deprecated --kilobytes option.Jim Meyering
2005-08-16(show_dev): New arg STAT_FILE. All uses changed.Paul Eggert
This sometimes gives better results on networked file systems that do not respect POSIX semantics. Problem reported by Bruno Haible.
2005-06-02Don't use "path" or "filename".Paul Eggert
Don't include "path-concat.h"; not needed.
2005-05-14Update FSF postal mail address.Jim Meyering
2005-05-14Update FSF postal mail address.Jim Meyering
2005-05-12Assume `free (NULL)' works.Jim Meyering
2005-03-28(find_mount_point, show_point): Use NULL, not `0'.Jim Meyering
2004-09-21Remove unused "case 0".Paul Eggert
2004-08-02(inode_format, show_all_fs, show_local_fs,Paul Eggert
show_listed_fs, posix_format, require_sync, print_type, selected_fstype, excluded_fstype, show_dev, show_point, main): Use bool for booleans. (df_readable, show_dev): Use UINTMAX_MAX instead of -1. (show_dev, show_point, main): Use EXIT_SUCCESS/EXIT_FAILURE instead of 0/1. Don't assume disk name lengths are <= INT_MAX. Rewrite pct calculation to avoid cast. (show_point): Don't assume resolved length is <= SSIZE_MAX.
2004-06-30(usage, main): Output "file system" rather than "filesystem".Jim Meyering
2004-05-06(main): Use xnmalloc, rather than xmalloc.Jim Meyering
2004-05-04(show_disk, show_point): If several filesystems areJim Meyering
mounted on the same mount point, prefer the last one, not the first. Problem reported by Christian Jones in <http://mail.gnu.org/archive/html/bug-coreutils/2004-04/msg00200.html>. (show_disk): Remove unused statp arg. Return bool, not int. (show_point): Rewrite to avoid gotos. Use the same algorithm for lofs and dummies for each pass through the mount table, rather than subtly different algorithms (which are probably inadvertent).
2004-01-21(usage): Use EXIT_SUCCESS, not 0, for clarity.Jim Meyering
(main): Don't assume EXIT_FAILURE == 1, as POSIX doesn't require it.
2003-11-02(add_fs_type, add_excluded_fs_type, main): Use `sizeof *var' ratherJim Meyering
than `sizeof EXPLICIT_TYPE'. The former is more maintainable and usually shorter. (main): Also remove anachronistic cast of xmalloc return value.
2003-10-18Most .c files (AUTHORS): Revert the WRITTEN_BY/AUTHORS changeJim Meyering
of 2003-09-19. Now, AUTHORS is a comma-separated list of strings. Update the call to parse_long_options so that `AUTHORS, NULL' are the last parameters. * src/true.c (main): Append NULL to version_etc argument list. * src/sys2.h (case_GETOPT_VERSION_CHAR): Likewise.
2003-09-18(WRITTEN_BY): Rename from AUTHORS.Jim Meyering
Begin each WRITTEN_BY string with `Written by ' and end it with `.'. Mark each WRITTEN_BY string as translatable.
2003-09-18revert previous changeJim Meyering
2003-09-18Update AUTHORS definition to be a comma-separated list of strings and/or updateJim Meyering
the call to parse_long_options so that `AUTHORS, NULL' are the last parameters.
2003-09-03(AUTHORS): Remove Larry McVoy's name, since the relativelyJim Meyering
small amount of code from him was first moved to lib/human.c, and was subsequently rewritten entirely.
2003-07-12(find_mount_point): Emit a diagnostic for eachJim Meyering
failed syscall, rather than relying on caller to do that. The caller couldn't do a good job, anyhow -- too many different ways to fail (each with a different referent). Give a diagnostic upon failed save_cwd, now that that function no longer calls `error'. (show_point): Don't diagnose find_mount_point's errors, now that it handles them itself.
2003-07-12(find_mount_point): Don't let free clobber errno upon failed chdirJim Meyering
2003-07-12It appears that the `#pragma alloca' included via "system.h" isJim Meyering
adequate, since join.c uses alloca, yet lacked an in-file #pragma. Remove `#pragma alloca'.
2003-06-17(main): Call initialize_main.Jim Meyering
2003-05-14(usage): Don't use `,' as the thousands separatorJim Meyering
in e.g. 1,000,000 and 1,048,576. Instead, do this: `SIZE may be ..., MB 1000*1000, M 1024*1024 and so on...'
2003-05-13Handle argc < optind.Jim Meyering
2003-04-11Remove anachronistic casts of xmalloc,Jim Meyering
xrealloc, and xcalloc return values and of xrealloc's first argument.
2003-03-04(find_mount_point): Call error here, now that restore_cwd no longer does it.Jim Meyering
2003-03-01(print_header): Don't embed spaces in a separate `Type'Jim Meyering
header string. Instead, put `Filesystem' and `Type' headers in the same string, so translators can use horizontal space as needed.
2003-02-20Now, df always displays the device file name corresponding to theJim Meyering
listed mount point under `Filesystem'. Before, for an unmounted block- or character-special file argument, it would display the command-line argument instead. (show_disk): Return a value indicating whether there was a match. Don't try to find a mount point here. (show_entry): If show_disk doesn't find a match, call show_point.
2003-02-19(print_header): Rather than using a hard-coded literalJim Meyering
string of spaces matching the length of the English `...Type' header, output the right number of spaces to match the selected translation. Reported by Yann Dirson and Jean Charles Delepine as Debian bug 131113.
2003-02-05(show_entry): Update sole use of show_disk.Jim Meyering
2003-02-04`df /dev/block-or-char-device-file--not-mounted' now reportsJim Meyering
the name of the file system on which the file resides, usually `/'. Before, it would leave the `Mounted on' field blank. (show_disk): Add parameter: STATP. If we don't find a matching device name, then resort to calling find_mount_point.
2003-02-04(show_disk): Move function to precede find_mount_point.Jim Meyering
2003-01-11Include "canonicalize.h".Jim Meyering
Use canonicalize_file_name unconditionally.
2003-01-10Include "xgetcwd.h".Jim Meyering
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.''