Page MenuHomeFreeBSD

loader: lua: remove the default kernel if it doesn't exist
ClosedPublic

Authored by kevans on Dec 8 2023, 5:16 AM.
Tags
None
Referenced Files
F102718096: D42967.diff
Sat, Nov 16, 7:30 AM
Unknown Object (File)
Sep 30 2024, 1:37 PM
Unknown Object (File)
Sep 30 2024, 7:28 AM
Unknown Object (File)
Sep 27 2024, 1:09 PM
Unknown Object (File)
Sep 24 2024, 2:41 AM
Unknown Object (File)
Sep 24 2024, 2:41 AM
Unknown Object (File)
Sep 22 2024, 12:03 PM
Unknown Object (File)
Sep 17 2024, 9:29 PM
Subscribers

Details

Summary

The kernel env var provides the default kernel, usually "kernel". It
may be the case that the user doesn't have a "kernel" kernel, just
"kernel.*" kernels, but have left kernel to the default because we
autodetect entries by default anyways.

If we're doing autodetection, take note of whether the default kernel
exists or not and remove it from the list if it doesn't and we had found
any other kernels. We avoid it in the #kernels == 1 case because
something fishy has likely happened and we should just trust the
configuration.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 54860
Build 51749: arc lint + arc unit