diff options
author | Thordur I. Bjornsson <thib@cvs.openbsd.org> | 2009-06-03 22:09:31 +0000 |
---|---|---|
committer | Thordur I. Bjornsson <thib@cvs.openbsd.org> | 2009-06-03 22:09:31 +0000 |
commit | b25274aac4d1fef726702d299f285d361d17febc (patch) | |
tree | bf0a0eecf0269cbaf678c70381c20b040e57ed02 /sys/ddb/db_command.c | |
parent | b96794b04ab20a0aba439e48813238555739661d (diff) |
add a flexible buffer queue (bufq) api, based on the never used
one by tedu@. It doesn't do anything smart yet, it just uses
plain old disksort. we also keep the old method of queueing bufs
since some miods have crazy MD drivers that need some love.
ok beck@, art@
tested by many on many archs.
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 309bbf2034d..e814d5c39e9 100644 --- a/sys/ddb/db_command.c +++ b/sys/ddb/db_command.c @@ -1,4 +1,4 @@ -/* $OpenBSD: db_command.c,v 1.51 2009/01/20 22:46:49 thib Exp $ */ +/* $OpenBSD: db_command.c,v 1.52 2009/06/03 22:09:30 thib Exp $ */ /* $NetBSD: db_command.c,v 1.20 1996/03/30 22:30:05 christos Exp $ */ /* @@ -39,6 +39,7 @@ #include <sys/msgbuf.h> #include <sys/malloc.h> #include <sys/mount.h> +#include <sys/buf.h> #include <uvm/uvm_extern.h> #include <machine/db_machdep.h> /* type definitions */ @@ -296,6 +297,19 @@ db_buf_print_cmd(db_expr_t addr, int have_addr, db_expr_t count, char *modif) /*ARGSUSED*/ void +db_bufq_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_bufq_print((struct bufq *) addr, full, db_printf); +} + + +/*ARGSUSED*/ +void db_map_print_cmd(db_expr_t addr, int have_addr, db_expr_t count, char *modif) { boolean_t full = FALSE; @@ -458,6 +472,7 @@ struct db_command db_show_cmds[] = { { "all", NULL, 0, db_show_all_cmds }, { "breaks", db_listbreak_cmd, 0, NULL }, { "buf", db_buf_print_cmd, 0, NULL }, + { "bufq", db_bufq_print_cmd, 0, NULL }, { "extents", db_extent_print_cmd, 0, NULL }, { "malloc", db_malloc_print_cmd, 0, NULL }, { "map", db_map_print_cmd, 0, NULL }, |