summaryrefslogtreecommitdiff
path: root/src/df.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1993-10-08 00:51:10 +0000
committerJim Meyering <jim@meyering.net>1993-10-08 00:51:10 +0000
commit95f7eb6267b6fa36b92e247eca2728cde8130f03 (patch)
treeb667ee079ab3c23c5e8506bb92cc0650f5cee7fb /src/df.c
parentd9d6720b77c2777aefcbabdfbd6dd250872d3a36 (diff)
downloadcoreutils-95f7eb6267b6fa36b92e247eca2728cde8130f03.tar.xz
merge with 3.8.3d
Diffstat (limited to 'src/df.c')
-rw-r--r--src/df.c33
1 files changed, 26 insertions, 7 deletions
diff --git a/src/df.c b/src/df.c
index 7b779258f..a4ef19df5 100644
--- a/src/df.c
+++ b/src/df.c
@@ -185,7 +185,7 @@ main (argc, argv)
add_excluded_fs_type (optarg);
break;
default:
- usage ();
+ usage (1);
}
}
@@ -196,7 +196,7 @@ main (argc, argv)
}
if (show_help)
- usage ();
+ usage (0);
if (optind != argc)
{
@@ -475,12 +475,31 @@ excluded_fstype (fstype)
}
static void
-usage ()
+usage (status)
+ int status;
{
fprintf (stderr, "\
-Usage: %s [-aikPv] [-t fstype] [-x fstype] [--all] [--inodes]\n\
-\t[--type=fstype] [--exclude-type=fstype] [--kilobytes] [--portability]\n\
-\t[--help] [--version] [path...]\n",
+Usage: %s [OPTION] [PATH]...\n\
+\n",
program_name);
- exit (1);
+
+ if (status == 0)
+ fprintf (stderr, "\
+ -a, --all include filesystems having 0 blocks\n\
+ -i, --inodes list inode information instead of block usage\n\
+ -k, --kilobytes use 1024 blocks, not 512 despite POSIXLY_CORRECT\n\
+ -t, --type TYPE limit the listing to TYPE filesystems type\n\
+ -x, --exclude-type TYPE limit the listing to not TYPE filesystems type\n\
+ -v (ignored)\n\
+ -P, --portability use the POSIX output format\n\
+ --help provide this help\n\
+ --version show program version\n\
+\n\
+If no PATHs are given, list all currently mounted filesystems.\n");
+
+ else
+ fprintf (stderr, "Try `%s --help' for more information.\n",
+ program_name);
+
+ exit (status);
}