From bff3900cf3ab70fb3dfb118e76d18c696033b3a9 Mon Sep 17 00:00:00 2001 From: krw Date: Wed, 10 Jul 2024 13:29:23 +0000 Subject: [PATCH] Add flags NOPERM, STALLED, SWAPPABLE, DOOMED to -v output. Brings -v output into line with MNT_BITS used in vfs_mount_print(). ok deraadt@ --- usr.sbin/pstat/pstat.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/usr.sbin/pstat/pstat.c b/usr.sbin/pstat/pstat.c index 5e24424cf83..84881a3bc00 100644 --- a/usr.sbin/pstat/pstat.c +++ b/usr.sbin/pstat/pstat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pstat.c,v 1.129 2022/02/22 17:35:01 deraadt Exp $ */ +/* $OpenBSD: pstat.c,v 1.130 2024/07/10 13:29:23 krw Exp $ */ /* $NetBSD: pstat.c,v 1.27 1996/10/23 22:50:06 cgd Exp $ */ /*- @@ -739,6 +739,11 @@ mount_print(struct mount *mp) flags &= ~MNT_NODEV; comma = ","; } + if (flags & MNT_NOPERM) { + (void)printf("%snoperm", comma); + flags &= ~MNT_NOPERM; + comma = ","; + } if (flags & MNT_ASYNC) { (void)printf("%sasync", comma); flags &= ~MNT_ASYNC; @@ -810,6 +815,16 @@ mount_print(struct mount *mp) flags &= ~MNT_FORCE; comma = ","; } + if (flags & MNT_STALLED) { + (void)printf("%sstalled", comma); + flags &= ~MNT_STALLED; + comma = ","; + } + if (flags & MNT_SWAPPABLE) { + (void)printf("%sswappable", comma); + flags &= ~MNT_SWAPPABLE; + comma = ","; + } if (flags & MNT_WANTRDWR) { (void)printf("%swantrdwr", comma); flags &= ~MNT_WANTRDWR; @@ -820,6 +835,11 @@ mount_print(struct mount *mp) flags &= ~MNT_SOFTDEP; comma = ","; } + if (flags & MNT_DOOMED) { + (void)printf("%sdoomed", comma); + flags &= ~MNT_DOOMED; + comma = ","; + } if (flags) (void)printf("%sunknown_flags:%x", comma, flags); (void)printf(")"); -- 2.20.1