Page MenuHomeFreeBSD

stand/uboot: Explain why we test for NULL here
ClosedPublic

Authored by imp on Jan 13 2023, 4:33 PM.
Tags
None
Referenced Files
F102653441: D38042.diff
Fri, Nov 15, 9:37 AM
Unknown Object (File)
Fri, Oct 18, 8:04 AM
Unknown Object (File)
Thu, Oct 17, 7:51 AM
Unknown Object (File)
Oct 16 2024, 6:50 AM
Unknown Object (File)
Oct 15 2024, 2:42 PM
Unknown Object (File)
Oct 13 2024, 5:31 AM
Unknown Object (File)
Oct 12 2024, 9:31 PM
Unknown Object (File)
Oct 12 2024, 11:40 AM
Subscribers

Details

Summary

Most parsedev routines assume that idev is non-null and can always be
set. Since we break from this pattern in uboot, explain why in a
comment. devparse was invented to put a lot of common code in one place
and to simplify the archsw.arch_getdev code and any dv_parsedev code
called. However, uboot couldn't use devparse at the time because its
device naming scheme slightly different parsing. So, we still use
uboot_parsedev directly from uboot_getdev where dev could be NULL. Add a
comment to this effect.

The match functionality added for ofw likely could be used to clean up
the multiple kludges that are here for uboot's device naming differences
with the normal boot loader. This work will wait for the future.

Sponsored by: Netflix

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable