Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/pstat Print address of lower vnode of layered fs vn...
details: https://anonhg.NetBSD.org/src/rev/a4025220a449
branches: trunk
changeset: 500522:a4025220a449
user: enami <enami%NetBSD.org@localhost>
date: Wed Dec 13 05:50:33 2000 +0000
description:
Print address of lower vnode of layered fs vnode.
diffstat:
usr.sbin/pstat/pstat.c | 31 +++++++++++++++++++++++++++++--
1 files changed, 29 insertions(+), 2 deletions(-)
diffs (73 lines):
diff -r e8a884e2a9a7 -r a4025220a449 usr.sbin/pstat/pstat.c
--- a/usr.sbin/pstat/pstat.c Wed Dec 13 05:34:55 2000 +0000
+++ b/usr.sbin/pstat/pstat.c Wed Dec 13 05:50:33 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pstat.c,v 1.55 2000/12/13 05:34:55 enami Exp $ */
+/* $NetBSD: pstat.c,v 1.56 2000/12/13 05:50:33 enami Exp $ */
/*-
* Copyright (c) 1980, 1991, 1993, 1994
@@ -43,7 +43,7 @@
#if 0
static char sccsid[] = "@(#)pstat.c 8.16 (Berkeley) 5/9/95";
#else
-__RCSID("$NetBSD: pstat.c,v 1.55 2000/12/13 05:34:55 enami Exp $");
+__RCSID("$NetBSD: pstat.c,v 1.56 2000/12/13 05:50:33 enami Exp $");
#endif
#endif /* not lint */
@@ -62,6 +62,7 @@
#undef NFS
#include <sys/uio.h>
#include <sys/namei.h>
+#include <miscfs/genfs/layer.h>
#include <miscfs/union/union.h>
#undef _KERNEL
#include <sys/stat.h>
@@ -167,6 +168,8 @@
getmnt __P((struct mount *));
struct e_vnode *
kinfo_vnodes __P((int *));
+void layer_header __P((void));
+int layer_print __P((struct vnode *));
struct e_vnode *
loadvnodes __P((int *));
int main __P((int, char **));
@@ -324,6 +327,11 @@
} else if (FSTYPE_IS(mp, MOUNT_EXT2FS)) {
ufs_header();
vnode_fsprint = ext2fs_print;
+ } else if (FSTYPE_IS(mp, MOUNT_NULL) ||
+ FSTYPE_IS(mp, MOUNT_OVERLAY) ||
+ FSTYPE_IS(mp, MOUNT_UMAP)) {
+ layer_header();
+ vnode_fsprint = layer_print;
} else if (FSTYPE_IS(mp, MOUNT_UNION)) {
union_header();
vnode_fsprint = union_print;
@@ -578,6 +586,25 @@
}
void
+layer_header()
+{
+
+ (void)printf(" LOWER");
+}
+
+int
+layer_print(vp)
+ struct vnode *vp;
+{
+ struct layer_node lnode, *lp = &lnode;
+
+ KGETRET(VTOLAYER(vp), &lnode, sizeof(lnode), "layer vnode");
+
+ (void)printf(" %8lx", (long)lp->layer_lowervp);
+ return (0);
+}
+
+void
union_header()
{
Home |
Main Index |
Thread Index |
Old Index