-.\" $OpenBSD: df.1,v 1.3 1996/06/23 14:19:51 deraadt Exp $
+.\" $OpenBSD: df.1,v 1.4 1996/12/07 09:09:04 deraadt Exp $
.\" $NetBSD: df.1,v 1.12 1995/12/05 02:42:45 jtc Exp $
.\"
.\" Copyright (c) 1989, 1990, 1993
option causes the numbers to be reported in kilobyte counts.
.It Fl l
Display statistics only about mounted file systems with the MNT_LOCAL
-flag set.
+flag set. If a non-local file system is given as an argument, a
+warning is issued and no information is given on that file system.
.It Fl n
Print out the previously obtained statistics from the file systems.
This option should be used if it is possible that one or more
.Dq no
to specify the filesystem types for which action should
.Em not
-be taken.
+be taken. If a file system is given on the command line that is not of
+the specified type, a warning is issued and no information is given on
+that file system.
.El
.Sh ENVIRONMENT VARIABLES
.Bl -tag -width BLOCKSIZE
-/* $OpenBSD: df.c,v 1.4 1996/08/02 12:40:53 deraadt Exp $ */
+/* $OpenBSD: df.c,v 1.5 1996/12/07 09:09:06 deraadt Exp $ */
/* $NetBSD: df.c,v 1.21.2.1 1995/11/01 00:06:11 jtc Exp $ */
/*
#if 0
static char sccsid[] = "@(#)df.c 8.7 (Berkeley) 4/2/94";
#else
-static char rcsid[] = "$OpenBSD: df.c,v 1.4 1996/08/02 12:40:53 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: df.c,v 1.5 1996/12/07 09:09:06 deraadt Exp $";
#endif
#endif /* not lint */
argc -= optind;
argv += optind;
- if (*argv && (lflag || typelist != NULL))
- errx(1, "-l or -t does not make sense with list of mount points");
-
mntsize = getmntinfo(&mntbuf, MNT_NOWAIT);
if (mntsize == 0)
err(1, "retrieving information on mounted file systems");
* implement nflag here.
*/
if (!statfs(mntpt, &mntbuf[mntsize]))
- ++mntsize;
+ if (lflag && (mntbuf[mntsize].f_flags & MNT_LOCAL) == 0)
+ warnx("%s is not a local file system",
+ *argv);
+ else if (!selected(mntbuf[mntsize].f_fstypename))
+ warnx("%s mounted as a %s file system",
+ *argv, mntbuf[mntsize].f_fstypename);
+ else
+ ++mntsize;
else
warn("%s", *argv);
}