HomeFreeBSD

stand: Add dv_match

Description

stand: Add dv_match

On OpenFirmware, and possibly kboot, we use full path names for the
objects that are the 'device'. kboot uses a hack of knowing that all
disk device nodes start with '/dev', but this generalizes it for
OpenFirmware where both 'block' and 'network' devices live in the same
namespace and one must ask the OF node its type to know if this device
type matches.

For drivers that don't specify, the current convention of using
strncmp() is retained. This is done only in devparse(), but everything
uses it directly (or will soon).

Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D37554

Details

Provenance
impAuthored on Nov 30 2022, 10:09 PM
Differential Revision
D37554: stand: Add dv_match
Parents
rG33bbe5ddcbbc: stand: parsedev API change: devspec now points to start of full device name
Branches
Unknown
Tags
Unknown