Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/pstat Filter out the VUSECOUNT_GATE bit



details:   https://anonhg.NetBSD.org/src/rev/8e9e497f3705
branches:  trunk
changeset: 955535:8e9e497f3705
user:      christos <christos%NetBSD.org@localhost>
date:      Sat Oct 03 14:01:16 2020 +0000

description:
Filter out the VUSECOUNT_GATE bit

diffstat:

 usr.sbin/pstat/pstat.c |  9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diffs (30 lines):

diff -r 1b42dd548493 -r 8e9e497f3705 usr.sbin/pstat/pstat.c
--- a/usr.sbin/pstat/pstat.c    Sat Oct 03 13:51:34 2020 +0000
+++ b/usr.sbin/pstat/pstat.c    Sat Oct 03 14:01:16 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pstat.c,v 1.130 2019/12/11 19:51:36 ad Exp $   */
+/*     $NetBSD: pstat.c,v 1.131 2020/10/03 14:01:16 christos Exp $     */
 
 /*-
  * Copyright (c) 1980, 1991, 1993, 1994
@@ -39,7 +39,7 @@
 #if 0
 static char sccsid[] = "@(#)pstat.c    8.16 (Berkeley) 5/9/95";
 #else
-__RCSID("$NetBSD: pstat.c,v 1.130 2019/12/11 19:51:36 ad Exp $");
+__RCSID("$NetBSD: pstat.c,v 1.131 2020/10/03 14:01:16 christos Exp $");
 #endif
 #endif /* not lint */
 
@@ -444,8 +444,9 @@
        PRWORD(ovflw, "%*lx", PTRSTRWIDTH, 0, (long)avnode);
        PRWORD(ovflw, " %*s", 4, 1, type);
        PRWORD(ovflw, " %*s", 6, 1, flags);
-       PRWORD(ovflw, " %*ld", 5, 1, (long)vp->v_usecount);
-       PRWORD(ovflw, " %*ld", 5, 1, (long)vp->v_holdcnt);
+#define   VUSECOUNT_MASK  0x7fffffff   /* XXX: kernel private */
+       PRWORD(ovflw, " %*d", 5, 1, vp->v_usecount & VUSECOUNT_MASK);
+       PRWORD(ovflw, " %*d", 5, 1, vp->v_holdcnt);
        PRWORD(ovflw, " %*d", 4, 1, vp->v_tag);
        PRWORD(ovflw, " %*d", 6, 1, vp->v_uobj.uo_npages);
        return (ovflw);



Home | Main Index | Thread Index | Old Index