Age | Commit message (Collapse) | Author |
|
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.
|
|
|
|
adequate, since join.c uses alloca, yet lacked an in-file #pragma.
Remove `#pragma alloca'.
|
|
|
|
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...'
|
|
|
|
xrealloc, and xcalloc return values and of xrealloc's first argument.
|
|
|
|
header string. Instead, put `Filesystem' and `Type' headers in the
same string, so translators can use horizontal space as needed.
|
|
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.
|
|
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.
|
|
|
|
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.
|
|
|
|
Use canonicalize_file_name unconditionally.
|
|
|
|
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.
|
|
|
|
since it's already included from sys2.h via system.h.
|
|
`exit (1)' to `exit (EXIT_FAILURE)', and
`usage (1)' to `usage (EXIT_FAILURE)'.
|
|
its heading, even when -P is used with -h or -H.
|
|
This fixes a bug where df would report Size < Used.
(df_readable): Omit last arg; we always round up now.
All callers changed.
|
|
|
|
(long_options, usage, main): Add -B.
(usage): Deprecate --kilobytes, -m, --megabytes.
Document size suffixes.
(print_header, show_dev): Enlarge column widths for trailing "B".
|
|
instead of hard-coding --help and --version descriptions.
|
|
for short options too.''
|
|
Use fputs, not printf.
|
|
[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.
|
|
(find_mount_point): No need to strip trailing
slashes before invoking new dir_name.
|
|
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.
|
|
|