diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2008-03-23 12:31:59 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2008-03-23 12:31:59 +0000 |
commit | e74a47347d1700b5f0ea6ef66ea0e2376c877294 (patch) | |
tree | 042df3715e4f4ec9169730d382a522b1fe5f5139 /sys | |
parent | 26f528257f76f2203ec455d7ef44887cd21308b5 (diff) |
show all mounts command for ddb. From mickey a long time ago.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/ddb/db_command.c | 17 | ||||
-rw-r--r-- | sys/ddb/db_command.h | 3 |
2 files changed, 18 insertions, 2 deletions
diff --git a/sys/ddb/db_command.c b/sys/ddb/db_command.c index 9eb3bf028cf..2c87db84340 100644 --- a/sys/ddb/db_command.c +++ b/sys/ddb/db_command.c @@ -1,4 +1,4 @@ -/* $OpenBSD: db_command.c,v 1.48 2007/11/14 17:52:36 miod Exp $ */ +/* $OpenBSD: db_command.c,v 1.49 2008/03/23 12:31:57 miod Exp $ */ /* $NetBSD: db_command.c,v 1.20 1996/03/30 22:30:05 christos Exp $ */ /* @@ -38,6 +38,7 @@ #include <sys/pool.h> #include <sys/msgbuf.h> #include <sys/malloc.h> +#include <sys/mount.h> #include <uvm/uvm_extern.h> #include <machine/db_machdep.h> /* type definitions */ @@ -333,6 +334,19 @@ db_mount_print_cmd(db_expr_t addr, int have_addr, db_expr_t count, char *modif) vfs_mount_print((struct mount *) addr, full, db_printf); } +void +db_show_all_mounts(db_expr_t addr, int have_addr, db_expr_t count, char *modif) +{ + boolean_t full = FALSE; + struct mount *mp; + + if (modif[0] == 'f') + full = TRUE; + + CIRCLEQ_FOREACH(mp, &mountlist, mnt_list) + vfs_mount_print(mp, full, db_printf); +} + /*ARGSUSED*/ void db_object_print_cmd(db_expr_t addr, int have_addr, db_expr_t count, char *modif) @@ -418,6 +432,7 @@ struct db_command db_show_all_cmds[] = { { "procs", db_show_all_procs, 0, NULL }, { "callout", db_show_callout, 0, NULL }, { "pools", db_show_all_pools, 0, NULL }, + { "mounts", db_show_all_mounts, 0, NULL }, { NULL, NULL, 0, NULL } }; diff --git a/sys/ddb/db_command.h b/sys/ddb/db_command.h index e1413bffcbc..4662acf7b6c 100644 --- a/sys/ddb/db_command.h +++ b/sys/ddb/db_command.h @@ -1,4 +1,4 @@ -/* $OpenBSD: db_command.h,v 1.20 2006/07/11 21:17:58 mickey Exp $ */ +/* $OpenBSD: db_command.h,v 1.21 2008/03/23 12:31:58 miod Exp $ */ /* $NetBSD: db_command.h,v 1.8 1996/02/05 01:56:55 christos Exp $ */ /* @@ -42,6 +42,7 @@ void db_buf_print_cmd(db_expr_t, int, db_expr_t, char *); void db_map_print_cmd(db_expr_t, int, db_expr_t, char *); void db_malloc_print_cmd(db_expr_t, int, db_expr_t, char *); void db_mount_print_cmd(db_expr_t, int, db_expr_t, char *); +void db_show_all_mounts(db_expr_t, int, db_expr_t, char *); void db_object_print_cmd(db_expr_t, int, db_expr_t, char *); void db_page_print_cmd(db_expr_t, int, db_expr_t, char *); void db_extent_print_cmd(db_expr_t, int, db_expr_t, char *); |