]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
subr_bus: introduce device_set_descf() and modify allocation logic
authorChristos Margiolis <christos@FreeBSD.org>
Tue, 16 Jan 2024 16:49:15 +0000 (18:49 +0200)
committerChristos Margiolis <christos@FreeBSD.org>
Tue, 16 Jan 2024 16:49:15 +0000 (18:49 +0200)
commit6b6914c1e21b625503a1b8d8d5cfdfbc4c6a6acd
treecb2f5ec807e735c394f9e76118855153700b8595
parent45cd29412eadbb0e8c40590a94b10663addac17a
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
share/man/man9/Makefile
share/man/man9/device_set_desc.9
sys/kern/subr_bus.c
sys/sys/bus.h