Page MenuHomeFreeBSD

mfiutil: Change mfi_autolearn_(period|mode) to write to a FILE
ClosedPublic

Authored by jhb on Jun 16 2025, 5:52 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Feb 1, 9:55 AM
Unknown Object (File)
Sun, Feb 1, 8:33 AM
Unknown Object (File)
Sat, Jan 31, 11:48 AM
Unknown Object (File)
Sat, Jan 31, 11:27 AM
Unknown Object (File)
Fri, Jan 30, 9:20 PM
Unknown Object (File)
Fri, Jan 30, 7:12 PM
Unknown Object (File)
Fri, Jan 16, 3:13 PM
Unknown Object (File)
Fri, Jan 16, 9:43 AM
Subscribers
None

Details

Summary

This avoids using fragile logic with snprintf() to build strings.

For the calling code in mfi_show.c, I chose to pass stdout directly
instead of using fmemopen() to write to the temporary buffer since
that is simpler and avoids having to deal with output truncation.

Diff Detail

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

Event Timeline

jhb requested review of this revision.Jun 16 2025, 5:52 PM
jhb created this revision.
This revision was not accepted when it landed; it landed in state Needs Review.Jul 7 2025, 5:23 PM
This revision was automatically updated to reflect the committed changes.