HomeFreeBSD

linuxkpi: Update posittion after copy in `seq_read()`

Description

linuxkpi: Update posittion after copy in seq_read()

seq_read() is usually called in a loop because the destination buffer
might be smaller than the source. The caller relies on the updated
position to read what is next.

We also use memcpy() instead of strscpy() because we don't need to
append a NUL character.

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

Details

Provenance
dumbbellAuthored on Jul 10 2025, 11:04 PM
Reviewer
bz
Differential Revision
D51560: linuxkpi: Update position after copy in `seq_read()`
Parents
rG7cbc4d875971: linuxkpi: Use `__builtin_popcountg()` instead of `bitcount*()`
Branches
Unknown
Tags
Unknown