git: e7c3889a1736 - stable/13 - unr(9): add 'show unrhdr_iter' command
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 05 Jun 2023 08:36:08 UTC
The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=e7c3889a17368ba396734019a480c0c2dfb3fd63 commit e7c3889a17368ba396734019a480c0c2dfb3fd63 Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2023-05-25 18:09:27 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> CommitDate: 2023-06-05 08:35:01 +0000 unr(9): add 'show unrhdr_iter' command (cherry picked from commit c4cc0cab1ea619e07b52ce4c3825e7941996cb49) --- sys/kern/subr_unit.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/sys/kern/subr_unit.c b/sys/kern/subr_unit.c index ee67e5db01d6..236ca9915740 100644 --- a/sys/kern/subr_unit.c +++ b/sys/kern/subr_unit.c @@ -1124,6 +1124,23 @@ DB_SHOW_COMMAND(unrhdr, unrhdr_print_unrhdr) print_unrhdr((struct unrhdr *)addr); } + +static void +print_unrhdr_iter(struct unrhdr_iter *iter) +{ + db_printf("iter %p unrhdr %p ipos %d upos %p ufi %d\n", + iter, iter->uh, iter->ipos, iter->upos, iter->upos_first_item); +} + +DB_SHOW_COMMAND(unrhdr_iter, unrhdr_print_iter) +{ + if (!have_addr) { + db_printf("show unrhdr_iter addr\n"); + return; + } + + print_unrhdr_iter((struct unrhdr_iter *)addr); +} #endif #ifndef _KERNEL /* USERLAND test driver */