Page MenuHomeFreeBSD

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

Authored by dumbbell on Jul 26 2025, 3:54 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Oct 12, 12:00 PM
Unknown Object (File)
Sun, Oct 12, 12:00 PM
Unknown Object (File)
Sun, Oct 12, 12:00 PM
Unknown Object (File)
Sun, Oct 12, 1:01 AM
Unknown Object (File)
Thu, Oct 9, 5:07 PM
Unknown Object (File)
Fri, Oct 3, 10:41 AM
Unknown Object (File)
Thu, Oct 2, 12:40 PM
Unknown Object (File)
Wed, Oct 1, 7:11 AM
Subscribers

Details

Summary

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.

Sponsored by: The FreeBSD Foundation

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable