Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

features: Expose KernelVersion function #570

Closed

Conversation

brycekahle
Copy link
Contributor

No description provided.

@lmb
Copy link
Collaborator

lmb commented Feb 16, 2022

@ti-mo ti-mo self-assigned this Feb 16, 2022
@brycekahle
Copy link
Contributor Author

@lmb the CI seems to be stuck on the 5.10 build

Copy link
Collaborator

@ti-mo ti-mo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we change the function doc to the below?

// KernelVersion returns the version of the currently running kernel.
//
// The kernel version and patch level are represented as a single value
// equal to the KERNEL_VERSION macro from linux/version.h.

And please squash and prefix your commit message with features: as it's useful to know it landed in the features package from looking at the commit log. :)

Thanks!

(I think you have enable pushes from maintainers turned off)

@ti-mo ti-mo changed the title Expose KernelVersion function features: Expose KernelVersion function Feb 18, 2022
@ti-mo
Copy link
Collaborator

ti-mo commented Feb 18, 2022

@brycekahle Just curious, but what is this going to be used for in practice? Wouldn't you prefer more feature probes being exposed over a version number? I think we (and you) have established it's essentially meaningless with the backporting going on in RHEL and friends, so this is adding a footgun. If we do decide to add it, it should come with warning bells. 🙂

@brycekahle
Copy link
Contributor Author

@ti-mo So we need this for a very specific reason. We are working on a feature to automatically download kernel headers. In order to validate that we have the correct headers to match the running kernel, we need to know what the LINUX_VERSION_CODE of the running kernel is, so we can compare it to the one from the header file.

@ti-mo
Copy link
Collaborator

ti-mo commented Feb 24, 2022

Superseded by #585.

@ti-mo ti-mo closed this Feb 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants