Age | Commit message (Collapse) | Author |
|
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).
|
|
|
|
corresponding argument in a `quote (...)' call.
|
|
Use integer arithmetic if it's easy.
Fix bug when converting twos-complement negative values to floating point.
|
|
Round negative numbers correctly.
(show_dev): Round disk usage up and disk free space down.
|
|
Cast undeclared `realpath' to char* to avoid warning.
|
|
|
|
prefixes that are loop file system mount points, since they
yield undesirable output.
|
|
Print the header line only if there is at least one valid argument.
Reported by Andy Longton <alongton@metamark.com>
|
|
(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.
|
|
(show_dev): Avoid overflow problems when calculating percent.
Do not display negative percents.
|
|
these and use them instead of `CHAR_MAX + n'.
|
|
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.
|
|
|
|
Use IF_LINT macro instead of #ifdef lint...
|
|
(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.
|
|
just warn rather than failing if the table of mounted filesystems
cannot be read.
|
|
via sys2.h.
|
|
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.
|
|
[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.
|
|
|
|
xargmatch.
|
|
|
|
|
|
let the device path and the file system type share a single (wider)
field if their combined lengths allow it. From Andries Brouwer.
|
|
|
|
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.
|
|
{"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.
|
|
(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.
|
|
|
|
|
|
up out of if-block -- code in the else-block depends on it too.
|
|
|
|
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.
|
|
|
|
and available columns from 7 to 8.
|
|
|
|
assume the original value corresponding to fsu_bavail was negative.
|
|
last column of `df -i' output. From Andreas Schwab.
|
|
with the rest of the output.
|
|
(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.
|
|
Include "closeout.h".
|
|
just like `fsu.fsu_blocks == 0' as an indicator that usage information
is invalid. This happens with Solaris-5.5.1 CD-ROM partitions.
|
|
not e.g., -a) back up to precede first print stmt.
|
|
|
|
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.
|
|
("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.
|
|
|
|
|
|
|