HomeFreeBSD

bus: Add device_has_children predicate

Description

bus: Add device_has_children predicate

Add a device_has_children() function which can be used to check if a
device has children without allocating a list of them which we aren't
going to use, or even counting them.

Also modify device_get_children() so it can be used to query the count
without allocating a list.

MFC after: 1 week
Sponsored by: Klara, Inc.
Sponsored by: NetApp, Inc.
Reviewed by: imp, markj
Differential Revision: https://reviews.freebsd.org/D53918

Details

Provenance
desAuthored on Fri, Nov 28, 9:14 AM
Reviewer
imp
Differential Revision
D53918: bus: Add device_has_children predicate
Parents
rG34d66b0c96d5: cxgbe(4): Delete leftovers from $FreeBSD$ removal
Branches
Unknown
Tags
Unknown