diff options
| author | 2009-01-18 13:36:56 +0000 | |
|---|---|---|
| committer | 2009-01-18 13:36:56 +0000 | |
| commit | cecbdfb662aba8ecf5ea3b6e63c31c4af9d6cd02 (patch) | |
| tree | 5a76e97a9d23d9e53b51130a94772f6ab14e40b5 /sys/ddb/db_command.c | |
| parent | vrng.4: period -> periodic (diff) | |
| download | wireguard-openbsd-cecbdfb662aba8ecf5ea3b6e63c31c4af9d6cd02.tar.xz wireguard-openbsd-cecbdfb662aba8ecf5ea3b6e63c31c4af9d6cd02.zip | |
Add nfs ddb hooks, for now only to show all the outstanding nfsreq's
and to print out struct nfsreq.
"get it in so people can pound on it" blambert@
OK and information_s_ on the manpage from miod@
Diffstat (limited to 'sys/ddb/db_command.c')
| -rw-r--r-- | sys/ddb/db_command.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/sys/ddb/db_command.c b/sys/ddb/db_command.c index 2c87db84340..4a8967b8328 100644 --- a/sys/ddb/db_command.c +++ b/sys/ddb/db_command.c @@ -1,4 +1,4 @@ -/* $OpenBSD: db_command.c,v 1.49 2008/03/23 12:31:57 miod Exp $ */ +/* $OpenBSD: db_command.c,v 1.50 2009/01/18 13:36:56 thib Exp $ */ /* $NetBSD: db_command.c,v 1.20 1996/03/30 22:30:05 christos Exp $ */ /* @@ -384,6 +384,19 @@ db_vnode_print_cmd(db_expr_t addr, int have_addr, db_expr_t count, char *modif) } /*ARGSUSED*/ +void +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; + + db_nfsreq_print((struct nfsreq *) addr, full, db_printf); +} + + +/*ARGSUSED*/ void db_show_panic_cmd(db_expr_t addr, int have_addr, db_expr_t count, char *modif) { @@ -433,6 +446,7 @@ struct db_command db_show_all_cmds[] = { { "callout", db_show_callout, 0, NULL }, { "pools", db_show_all_pools, 0, NULL }, { "mounts", db_show_all_mounts, 0, NULL }, + { "nfsreq", db_show_all_nfsreqs, 0, NULL }, { NULL, NULL, 0, NULL } }; @@ -452,6 +466,7 @@ struct db_command db_show_cmds[] = { { "registers", db_show_regs, 0, NULL }, { "uvmexp", db_uvmexp_print_cmd, 0, NULL }, { "vnode", db_vnode_print_cmd, 0, NULL }, + { "nfsreq", db_nfsreq_print_cmd, 0, NULL }, { "watches", db_listwatch_cmd, 0, NULL }, { NULL, NULL, 0, NULL } }; |
