diff options
author | jkh <jkh@FreeBSD.org> | 2003-06-02 22:33:12 +0000 |
---|---|---|
committer | jkh <jkh@FreeBSD.org> | 2003-06-02 22:33:12 +0000 |
commit | 2e06580e0ad39f5c7c00f2b475cab9003e17e6a8 (patch) | |
tree | 6ba1d5d3ea3f59e074e9c9274946a157bb57ad5d /bin | |
parent | bc4e199669145fcc65242a12fe314c9e69bbd913 (diff) | |
download | FreeBSD-src-2e06580e0ad39f5c7c00f2b475cab9003e17e6a8.zip FreeBSD-src-2e06580e0ad39f5c7c00f2b475cab9003e17e6a8.tar.gz |
From the df man page:
-t Only print out statistics for filesystems of the specified types.
Make the behavior of df(1) conform to its man page (behavior is otherwise
undefined).
Submitted by: Rob Braun <bbraun@apple.com>
Obtained from: Apple
Diffstat (limited to 'bin')
-rw-r--r-- | bin/df/df.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/bin/df/df.c b/bin/df/df.c index 33e8c01..bb12fd4 100644 --- a/bin/df/df.c +++ b/bin/df/df.c @@ -280,6 +280,15 @@ main(int argc, char *argv[]) rv = 1; continue; } + /* Check to make sure the arguments we've been + * given are satisfied. Return an error if we + * have been asked to list a mount point that does + * not match the other args we've been given (-l, -t, etc.) + */ + if (checkvfsname(statfsbuf.f_fstypename, vfslist)) { + rv++; + continue; + } if (argc == 1) { bzero(&maxwidths, sizeof(maxwidths)); update_maxwidths(&maxwidths, &statfsbuf); |