summaryrefslogtreecommitdiff
path: root/sys/ddb/db_command.c
diff options
context:
space:
mode:
authorThordur I. Bjornsson <thib@cvs.openbsd.org>2009-08-14 21:16:14 +0000
committerThordur I. Bjornsson <thib@cvs.openbsd.org>2009-08-14 21:16:14 +0000
commitf8b1f34773266b2eb78bfde67f54046befc4a5c2 (patch)
tree6c9b413b711443d586b2280e619ac44a1160bf83 /sys/ddb/db_command.c
parent31321762e2f18a8b0185b04f003f256a65fa9ecc (diff)
add ddb functions to be able to show all the nfsnodes in the system
and rewrite the nfsreq code to use pool_walk(). OK beck@, blambert@
Diffstat (limited to 'sys/ddb/db_command.c')
-rw-r--r--sys/ddb/db_command.c24
1 files changed, 20 insertions, 4 deletions
diff --git a/sys/ddb/db_command.c b/sys/ddb/db_command.c
index 93160167b8b..1115a45d70b 100644
--- a/sys/ddb/db_command.c
+++ b/sys/ddb/db_command.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: db_command.c,v 1.58 2009/08/13 15:42:03 thib Exp $ */
+/* $OpenBSD: db_command.c,v 1.59 2009/08/14 21:16:13 thib Exp $ */
/* $NetBSD: db_command.c,v 1.20 1996/03/30 22:30:05 christos Exp $ */
/*
@@ -398,14 +398,28 @@ db_vnode_print_cmd(db_expr_t addr, int have_addr, db_expr_t count, char *modif)
#ifdef NFSCLIENT
/*ARGSUSED*/
void
-db_nfsreq_print_cmd(db_expr_t addr, int have_addr, db_expr_t count, char *modif)
+db_nfsreq_print_cmd(db_expr_t addr, int have_addr, db_expr_t count,
+ char *modif)
+{
+ boolean_t full = FALSE;
+
+ if (modif[0] == 'f')
+ full = TRUE;
+
+ nfs_request_print((void *)addr, full, db_printf);
+}
+
+/*ARGSUSED*/
+void
+db_nfsnode_print_cmd(db_expr_t addr, int have_addr, db_expr_t count,
+ char *modif)
{
boolean_t full = FALSE;
if (modif[0] == 'f')
full = TRUE;
- db_nfsreq_print((struct nfsreq *) addr, full, db_printf);
+ nfs_node_print((void *)addr, full, db_printf);
}
#endif
@@ -471,7 +485,8 @@ struct db_command db_show_all_cmds[] = {
{ "mounts", db_show_all_mounts, 0, NULL },
{ "vnodes", db_show_all_vnodes, 0, NULL },
#ifdef NFSCLIENT
- { "nfsreq", db_show_all_nfsreqs, 0, NULL },
+ { "nfsreqs", db_show_all_nfsreqs, 0, NULL },
+ { "nfsnodes", db_show_all_nfsnodes, 0, NULL },
#endif
{ NULL, NULL, 0, NULL }
};
@@ -487,6 +502,7 @@ struct db_command db_show_cmds[] = {
{ "mount", db_mount_print_cmd, 0, NULL },
#ifdef NFSCLIENT
{ "nfsreq", db_nfsreq_print_cmd, 0, NULL },
+ { "nfsnode", db_nfsnode_print_cmd, 0, NULL },
#endif
{ "object", db_object_print_cmd, 0, NULL },
#ifdef DDB_STRUCT_INFORMATION