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
Unknown Object (File)
Sun, Nov 30, 5:58 AM
Unknown Object (File)
Fri, Nov 28, 11:11 PM
Unknown Object (File)
Tue, Nov 25, 8:19 AM
Unknown Object (File)
Sat, Nov 22, 9:18 PM
Unknown Object (File)
Nov 2 2025, 3:29 AM
Unknown Object (File)
Oct 31 2025, 3:03 AM
Unknown Object (File)
Oct 30 2025, 9:41 PM
Unknown Object (File)
Oct 29 2025, 12:03 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 Not Applicable
Unit
Tests Not Applicable