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)
Fri, May 29, 6:53 AM
Unknown Object (File)
Apr 28 2026, 2:07 AM
Unknown Object (File)
Apr 27 2026, 9:42 PM
Unknown Object (File)
Apr 24 2026, 4:25 PM
Unknown Object (File)
Apr 15 2026, 5:55 AM
Unknown Object (File)
Apr 7 2026, 5:03 PM
Unknown Object (File)
Apr 7 2026, 3:13 PM
Unknown Object (File)
Apr 2 2026, 1:48 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 Skipped
Unit
Tests Skipped
Build Status
Buildable 64912
Build 61795: arc lint + arc unit

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.