HomeFreeBSD

subr_bus: introduce device_set_descf() and modify allocation logic

Description

subr_bus: introduce device_set_descf() and modify allocation logic

device_set_descf() is a printf-like version of device_set_desc().

Allocation code has been transferred from device_set_desc_internal() to
device_set_desc_copy() and device_set_descf() to avoid complicating
device_set_desc_internal(). The "copy" argument in
device_set_desc_internal() has been replaced with a flag which is set
when the description string has been allocated with M_BUS.

Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Reviewed by: imp, markj
Differential Revision: https://reviews.freebsd.org/D43370

(cherry picked from commit 6b6914c1e21b625503a1b8d8d5cfdfbc4c6a6acd)

Details

Provenance
christosAuthored on Jan 16 2024, 4:49 PM
Reviewer
imp
Differential Revision
D43370: subr_bus: introduce device_set_descf() and modify allocation logic
Parents
rGe95213b35b2c: usb: use only usb_devinfo() in device_set_usb_desc()
Branches
Unknown
Tags
Unknown