HomeFreeBSD

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

Description

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

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.

Differential Revision: https://reviews.freebsd.org/D50881

Details

Provenance
jhbAuthored on Jul 7 2025, 4:36 PM
Differential Revision
D50881: mfiutil: Change mfi_autolearn_(period|mode) to write to a FILE
Parents
rG96f544bcc1cb: tcp: don't allow to connect a TCP/IPv6 endpoint in TIME WAIT state
Branches
Unknown
Tags
Unknown