summaryrefslogtreecommitdiff
path: root/src/df.c
AgeCommit message (Collapse)Author
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.
1996-12-10(find_mount_point): Convert from K&R style header to ANSI.Jim Meyering
Patch from Kaveh Ghazi.
1996-11-30(main): Accept -F as a synonym for -t for compatibilityJim Meyering
with Solaris. From Peter Eriksson.
1996-11-28(find_mount_point): Use strip_trailing_slashes and dirnameJim Meyering
instead of open-coding them. When given FILE containing no slashes, chdir to the directory containing it (the current directory) rather than to `..'.
1996-11-28(find_mount_point): Use save_cwd/restore_cwd.Jim Meyering
"save-cwd.h": New include. (show_dev): Deal with null values for DISK and FSTYPE, including interpreting special 0 errno return from get_fs_usage. (show_point): Don't fail if we can't find a mount entry for POINT, just call show_dev with 0 values and let it fail if necessary. (main): Require a non-zero MOUNT_LIST only if showing all filesystems. (find_mount_point): New function. (xgetcwd): New declaration. All from Miles.
1996-11-24(usage): Remove trailing pair of blanks.Jim Meyering
1996-11-23(usage): Alphabetize option descriptions the way sort -f would.Jim Meyering
1996-11-03change bug-reporting addressJim Meyering
1996-11-02change bug-reporting addressJim Meyering
1996-10-05(main): update --version output to conform to coding standardJim Meyering
1996-10-04(main): update --version output to conform to coding standardJim Meyering
1996-08-31(usage): remove spurious trailing \n in puts.Jim Meyering
1996-08-29(usage): Tell where to report bugs.Jim Meyering
1996-06-19(selected_fstype, excluded_fstype, show_disk, main):Jim Meyering
Use STREQ here instead of strcmp(...) == 0.
1996-05-16Rearrange function definitions to precede respective uses to obviateJim Meyering
all forward dcls. Remove forward dcls. Declare parameters const as appropriate.
1996-05-16.Jim Meyering
1996-05-16(selected_fstype): Move definition to precede use.Jim Meyering
Remove prototype. Declare parameter FSTYPE to be const. (excluded_fstype): Likewise. (main): Fail with a diagnostic if both --human-readable and --portability are used. Likewise if --megabytes and --portability are used.
1996-04-24Be consistent. Accept --human-readable, not --human.Jim Meyering
(usage): Reflect the change.
1996-04-24update Copyright years for 1996Jim Meyering
1996-04-22(usage): Reflect that now --no-sync is the default.Jim Meyering
1996-04-20No longer call sync by default.Jim Meyering
1996-03-24Update FSF's address.Jim Meyering
1996-03-21(main): Declare to be of type int, not void.Jim Meyering