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)
Sat, May 23, 10:23 AM
Unknown Object (File)
Thu, May 21, 3:41 PM
Unknown Object (File)
Wed, May 20, 9:47 AM
Unknown Object (File)
Sun, May 17, 5:16 AM
Unknown Object (File)
Wed, May 13, 4:38 PM
Unknown Object (File)
Wed, May 13, 7:46 AM
Unknown Object (File)
Wed, May 13, 5:03 AM
Unknown Object (File)
Wed, May 13, 5:01 AM
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