git: 7c0cbba1d51d - stable/13 - kern: physmem: don't truncate addresses in DEBUG output
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 17 Mar 2023 05:48:35 UTC
The branch stable/13 has been updated by kevans:
URL: https://cgit.FreeBSD.org/src/commit/?id=7c0cbba1d51d87dacb98806a2cb026c8733615ed
commit 7c0cbba1d51d87dacb98806a2cb026c8733615ed
Author: Kyle Evans <kevans@FreeBSD.org>
AuthorDate: 2023-02-20 18:54:00 +0000
Commit: Kyle Evans <kevans@FreeBSD.org>
CommitDate: 2023-03-17 05:01:36 +0000
kern: physmem: don't truncate addresses in DEBUG output
Make it consistent with the above region printing, otherwise it appears
to be somewhat confusing.
(cherry picked from commit cd73914b01a1f2300e587f802383cc563f2e7103)
(cherry picked from commit 7b5cb32fca26428b8c0df98f9c58444557f808ae)
(cherry picked from commit c32946d8bee0d82042165c5d78b4d339d1268a2a)
---
sys/kern/subr_physmem.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/sys/kern/subr_physmem.c b/sys/kern/subr_physmem.c
index 2c7837019ea2..7cb45621a155 100644
--- a/sys/kern/subr_physmem.c
+++ b/sys/kern/subr_physmem.c
@@ -116,7 +116,7 @@ panic(const char *fmt, ...)
* db_printf).
*/
static void
-physmem_dump_tables(int (*prfunc)(const char *, ...))
+physmem_dump_tables(int (*prfunc)(const char *, ...) __printflike(1, 2))
{
size_t i;
int flags;
@@ -145,10 +145,12 @@ physmem_dump_tables(int (*prfunc)(const char *, ...))
#ifdef DEBUG
prfunc("Avail lists:\n");
for (i = 0; phys_avail[i] != 0; ++i) {
- prfunc(" phys_avail[%d] 0x%08x\n", i, phys_avail[i]);
+ prfunc(" phys_avail[%zu] 0x%08jx\n", i,
+ (uintmax_t)phys_avail[i]);
}
for (i = 0; dump_avail[i] != 0; ++i) {
- prfunc(" dump_avail[%d] 0x%08x\n", i, dump_avail[i]);
+ prfunc(" dump_avail[%zu] 0x%08jx\n", i,
+ (uintmax_t)dump_avail[i]);
}
#endif
}