summaryrefslogtreecommitdiffstats
path: root/sbin/mount
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1998-03-27 10:52:13 +0000
committerpeter <peter@FreeBSD.org>1998-03-27 10:52:13 +0000
commitd978ab5c8396de74f0d2cdcb991383be6276c41c (patch)
treebae393c306a0befe702d7ba50901653a6ef766a3 /sbin/mount
parent4db0fa09db895f439a5a91029e7625e329fda730 (diff)
downloadFreeBSD-src-d978ab5c8396de74f0d2cdcb991383be6276c41c.zip
FreeBSD-src-d978ab5c8396de74f0d2cdcb991383be6276c41c.tar.gz
Don't print the 'writes: sync & async' stuff if we're mounted readonly
or if the fs isn't keeping the stats..
Diffstat (limited to 'sbin/mount')
-rw-r--r--sbin/mount/mount.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/sbin/mount/mount.c b/sbin/mount/mount.c
index f4ee239..be4b75a 100644
--- a/sbin/mount/mount.c
+++ b/sbin/mount/mount.c
@@ -42,7 +42,7 @@ static const char copyright[] =
static char sccsid[] = "@(#)mount.c 8.25 (Berkeley) 5/8/95";
#else
static const char rcsid[] =
- "$Id: mount.c,v 1.22 1998/02/13 04:54:27 bde Exp $";
+ "$Id: mount.c,v 1.23 1998/03/08 09:56:02 julian Exp $";
#endif
#endif /* not lint */
@@ -496,8 +496,11 @@ prmount(sfp)
else
(void)printf("%d", sfp->f_owner);
}
- (void)printf("%swrites: sync %d async %d)\n", !f++ ? " (" : ", ",
- sfp->f_syncwrites, sfp->f_asyncwrites);
+ if ((sfp->f_syncwrites != 0 || sfp->f_asyncwrites != 0) &&
+ (sfp->f_flags & MNT_RDONLY) == 0)
+ (void)printf("%swrites: sync %d async %d)",
+ !f++ ? " (" : ", ", sfp->f_syncwrites, sfp->f_asyncwrites);
+ (void)printf("%s\n", f ? ")" : "");
}
struct statfs *
OpenPOWER on IntegriCloud