HomeFreeBSD

linuxkpi: Avoid trailing whitespaces in lkpi_hex_dump()

Description

linuxkpi: Avoid trailing whitespaces in lkpi_hex_dump()

We use the return value of the callback to track the number of bytes
written. We use it to determine if a group of characters should be
prepended with a whitespace. This way, we never add a trailing
whitespace.

We need to pay attention to the return value of the callback: if it is
negative, it's an error and we return immediately. Otherwise, we would
decrease the number of written bytes and possibly make it negative.

Reviewed by: bz, christos
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D51558

Details

Provenance
dumbbellAuthored on Jul 26 2025, 3:30 PM
Reviewer
bz
Differential Revision
D51558: linuxkpi: Avoid trailing whitespaces in lkpi_hex_dump()
Parents
rG08cdcff58acb: crypto/openssl: update vendor update instructions
Branches
Unknown
Tags
Unknown