Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 5 Jun 2023 08:36:08 GMT
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: e7c3889a1736 - stable/13 - unr(9): add 'show unrhdr_iter' command
Message-ID:  <202306050836.3558a89i024473@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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 */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202306050836.3558a89i024473>