HomeFreeBSD

LinuxKPI: add seq_hex_dump()

Description

LinuxKPI: add seq_hex_dump()

Move the implementation of print_hex_dump() into linux_compat.c as
lkpi_hex_dump() taking an extra function pointer and argument.
Add two internal wrappers for printf and sbuf_printf to get a common
function definition (sbuf_printf takes the extra argument).

Use these to implement print_hex_dump() and the newly added
seq_hex_dump().

This allows us to re-use the same implementation of print_hex_dump()
for both functions without duplicating the code.

Initial implementation: D49381 by dumbbell
Sponsored by: The FreeBSD Foundation
Reviewed by: dumbbell
Differential Revision: https://reviews.freebsd.org/D49637

(cherry picked from commit 4359672e656af5e6758d0aae147212e58f445f5b)

Details

Provenance
bzAuthored on Apr 2 2025, 6:06 PM
Reviewer
dumbbell
Differential Revision
D49637: LinuxKPI: add seq_hex_dump()
Parents
rGebe210ca703b: LinuxKPI; cleanup slab.h a bit; move more free() into slab.c
Branches
Unknown
Tags
Unknown