diff options
author | pjd <pjd@FreeBSD.org> | 2006-09-04 22:15:44 +0000 |
---|---|---|
committer | pjd <pjd@FreeBSD.org> | 2006-09-04 22:15:44 +0000 |
commit | 12baf6e1ec9554f0d2da00985e15d179fce94c88 (patch) | |
tree | 4aba7e74113501614b0b7caae454ff3f06482275 | |
parent | 68abcd5aeb6ba21454ac523baad07979589557af (diff) | |
download | FreeBSD-src-12baf6e1ec9554f0d2da00985e15d179fce94c88.zip FreeBSD-src-12baf6e1ec9554f0d2da00985e15d179fce94c88.tar.gz |
Add 'show vnode <addr>' DDB command.
-rw-r--r-- | sys/kern/vfs_subr.c | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 4a271c3..2903e7d 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -81,6 +81,10 @@ __FBSDID("$FreeBSD$"); #include <vm/vm_kern.h> #include <vm/uma.h> +#ifdef DDB +#include <ddb/ddb.h> +#endif + static MALLOC_DEFINE(M_NETADDR, "subr_export_host", "Export host address structure"); static void delmntque(struct vnode *vp); @@ -2543,7 +2547,6 @@ vn_printf(struct vnode *vp, const char *fmt, ...) } #ifdef DDB -#include <ddb/ddb.h> /* * List all of the locked vnodes in the system. * Called when debugging the kernel. @@ -2569,7 +2572,20 @@ DB_SHOW_COMMAND(lockedvnods, lockedvnodes) nmp = TAILQ_NEXT(mp, mnt_list); } } -#endif + +/* + * Show details about the given vnode. + */ +DB_SHOW_COMMAND(vnode, db_show_vnode) +{ + struct vnode *vp; + + if (!have_addr) + return; + vp = (struct vnode *)addr; + vn_printf(vp, "vnode "); +} +#endif /* DDB */ /* * Fill in a struct xvfsconf based on a struct vfsconf. |