Page MenuHomeFreeBSD

LinuxKPI: add seq_hex_dump()
Needs ReviewPublic

Authored by bz on Wed, Apr 2, 6:13 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Apr 4, 5:53 AM
Unknown Object (File)
Fri, Apr 4, 5:01 AM
Unknown Object (File)
Thu, Apr 3, 9:11 PM

Details

Reviewers
dumbbell
Summary

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
MFC after: 3 days

Test Plan

Entirely untested!

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 63282
Build 60166: arc lint + arc unit

Event Timeline

bz requested review of this revision.Wed, Apr 2, 6:13 PM

Given this got automatic subscribers: this is up for discussion as an alternative to D49381 as I didn't like duplicating what looks like slightly weird code to me.