HomeFreeBSD

stand: parsedev API change: devspec now points to start of full device name

Description

stand: parsedev API change: devspec now points to start of full device name

To support more flexible device matching, we now pass in the full
devspec to the parsedev routines. For everything execpt uboot, this is
just a drop in (since everything except uboot and openfirmware always
uses disk...: and/or zfs:, but openfirmware isn't really affected).

uboot we kludge around it by subtracting 4 from where the rest of the
device name starts. This is unforunate, and can compute the address one
before the string. But we never dereference that address. uboot needs
more work, and this is an acceptable UB until that other work happens.

OFW doesn't really use the parsedev routines these days (since none of
the supported device uses this... yet). It too needs more work, but it
needs device matching support first.

Sponsored by: Netflix
Reviewed by: delphij
Differential Revision: https://reviews.freebsd.org/D37553

Details

Provenance
impAuthored on Nov 30 2022, 10:09 PM
Reviewer
delphij
Differential Revision
D37553: stand: parsedev API change: devspec now points to start of full device name
Parents
rG66012c8fc4f9: stand: create devinit
Branches
Unknown
Tags
Unknown