diff options
author | bde <bde@FreeBSD.org> | 1998-06-08 14:08:54 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1998-06-08 14:08:54 +0000 |
commit | 097007d02ba3ebf09dd095a15c221937c2ecc66d (patch) | |
tree | f282a5e5a5e7e4a53befb625db54e8efe1797825 /sbin | |
parent | c799e18e3707886c2c229a0b1bd8645b29a3c65b (diff) | |
download | FreeBSD-src-097007d02ba3ebf09dd095a15c221937c2ecc66d.zip FreeBSD-src-097007d02ba3ebf09dd095a15c221937c2ecc66d.tar.gz |
Print the write counts if they are nonzero even if we're mounted
readonly, since they tell us about previous write activity.
Use the correct format to print the write counts.
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/mount/mount.c | 7 | ||||
-rw-r--r-- | sbin/mount_ifs/mount.c | 7 |
2 files changed, 6 insertions, 8 deletions
diff --git a/sbin/mount/mount.c b/sbin/mount/mount.c index 3ac616c..d27898e 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.25 1998/04/08 18:31:18 wosch Exp $"; + "$Id: mount.c,v 1.26 1998/05/17 21:57:17 dt Exp $"; #endif #endif /* not lint */ @@ -497,9 +497,8 @@ prmount(sfp) else (void)printf("%d", sfp->f_owner); } - if ((sfp->f_syncwrites != 0 || sfp->f_asyncwrites != 0) && - (sfp->f_flags & MNT_RDONLY) == 0) - (void)printf("%swrites: sync %d async %d", + if (sfp->f_syncwrites != 0 || sfp->f_asyncwrites != 0) + (void)printf("%swrites: sync %ld async %ld", !f++ ? " (" : ", ", sfp->f_syncwrites, sfp->f_asyncwrites); (void)printf("%s\n", f ? ")" : ""); } diff --git a/sbin/mount_ifs/mount.c b/sbin/mount_ifs/mount.c index 3ac616c..d27898e 100644 --- a/sbin/mount_ifs/mount.c +++ b/sbin/mount_ifs/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.25 1998/04/08 18:31:18 wosch Exp $"; + "$Id: mount.c,v 1.26 1998/05/17 21:57:17 dt Exp $"; #endif #endif /* not lint */ @@ -497,9 +497,8 @@ prmount(sfp) else (void)printf("%d", sfp->f_owner); } - if ((sfp->f_syncwrites != 0 || sfp->f_asyncwrites != 0) && - (sfp->f_flags & MNT_RDONLY) == 0) - (void)printf("%swrites: sync %d async %d", + if (sfp->f_syncwrites != 0 || sfp->f_asyncwrites != 0) + (void)printf("%swrites: sync %ld async %ld", !f++ ? " (" : ", ", sfp->f_syncwrites, sfp->f_asyncwrites); (void)printf("%s\n", f ? ")" : ""); } |