Don't print the 'writes: sync & async' stuff if we're mounted readonly

or if the fs isn't keeping the stats..
This commit is contained in:
Peter Wemm 1998-03-27 10:52:13 +00:00
parent c6bcf724da
commit 1cd2698705
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=34910
2 changed files with 12 additions and 6 deletions

View File

@ -42,7 +42,7 @@ static const char copyright[] =
static char sccsid[] = "@(#)mount.c 8.25 (Berkeley) 5/8/95"; static char sccsid[] = "@(#)mount.c 8.25 (Berkeley) 5/8/95";
#else #else
static const char rcsid[] = 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
#endif /* not lint */ #endif /* not lint */
@ -496,8 +496,11 @@ prmount(sfp)
else else
(void)printf("%d", sfp->f_owner); (void)printf("%d", sfp->f_owner);
} }
(void)printf("%swrites: sync %d async %d)\n", !f++ ? " (" : ", ", if ((sfp->f_syncwrites != 0 || sfp->f_asyncwrites != 0) &&
sfp->f_syncwrites, sfp->f_asyncwrites); (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 * struct statfs *

View File

@ -42,7 +42,7 @@ static const char copyright[] =
static char sccsid[] = "@(#)mount.c 8.25 (Berkeley) 5/8/95"; static char sccsid[] = "@(#)mount.c 8.25 (Berkeley) 5/8/95";
#else #else
static const char rcsid[] = 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
#endif /* not lint */ #endif /* not lint */
@ -496,8 +496,11 @@ prmount(sfp)
else else
(void)printf("%d", sfp->f_owner); (void)printf("%d", sfp->f_owner);
} }
(void)printf("%swrites: sync %d async %d)\n", !f++ ? " (" : ", ", if ((sfp->f_syncwrites != 0 || sfp->f_asyncwrites != 0) &&
sfp->f_syncwrites, sfp->f_asyncwrites); (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 * struct statfs *