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)
Wed, Oct 15, 7:32 AM
Unknown Object (File)
Wed, Oct 15, 7:32 AM
Unknown Object (File)
Wed, Oct 15, 7:32 AM
Unknown Object (File)
Tue, Oct 14, 9:20 PM
Unknown Object (File)
Thu, Oct 2, 10:10 AM
Unknown Object (File)
Mon, Sep 29, 11:42 PM
Unknown Object (File)
Sun, Sep 28, 6:19 PM
Unknown Object (File)
Thu, Sep 25, 6:36 PM
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.