Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
kernel: Replace how kernel version information is found.
The old code was fairly bogus. In the new code there is one "public" function: val get_kernel_version : bool -> string -> string option which takes a full vmlinuz path and returns the kernel version from it if possible (or None if not). This function first looks at the file content to see if the version can be extracted, and if that fails looks at the filename. As a side effect of making this change, we also filter out kernels from /boot where we cannot read the kernel version.
- Loading branch information
Showing
1 changed file
with
51 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters