HomeFreeBSD

mfiutil: Use sbuf(3) to construct drive names in mfi_drive_name

Description

mfiutil: Use sbuf(3) to construct drive names in mfi_drive_name

This replaces fragile uses of snprintf(). Note that I did not keep
the truncation check for the space separator in the middle of the
drive name since the same check was not applied to the second part, so
the name was truncated anyway. Just truncate the entire result if it
doesn't fit.

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

Details

Provenance
jhbAuthored on Jul 7 2025, 4:37 PM
Differential Revision
D50883: mfiutil: Use sbuf(3) to construct drive names in mfi_drive_name
Parents
rG10ed5b90e46f: mfiutil: Handle truncation in mfi_next_learn_time
Branches
Unknown
Tags
Unknown