mirror of
git://git.sv.gnu.org/coreutils.git
synced 2026-04-12 15:06:44 +02:00
no output. This change was in 6.0 but inadvertently unmentioned. * doc/coreutils.texi (df invocation): df exits nonzero if it outpus nothing. * src/df.c (file_systems_processed): Renamed from n_valid_args, and now a boolean. (show_dev): Don't set it until we actually output something. Print the header if this is the first output. (main): Don't print a header, as that is now show_dev's job. * tests/misc/Makefile.am (TESTS): Add df. * tests/misc/df: New file.
18 lines
187 B
Bash
Executable File
18 lines
187 B
Bash
Executable File
#!/bin/sh
|
|
# Ensure that "df ." outputs a header.
|
|
|
|
if test "$VERBOSE" = yes; then
|
|
set -x
|
|
df --version
|
|
fi
|
|
|
|
case `df .` in
|
|
*'
|
|
'*)
|
|
fail=0;;
|
|
*)
|
|
fail=1;;
|
|
esac
|
|
|
|
(exit $fail); exit $fail
|