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

Don't error out on truncated values #52

Merged
merged 1 commit into from
Apr 14, 2022
Merged

Conversation

jvimal-eg
Copy link
Contributor

It's possible for sysctl call to return fewer bytes than expected, in which case we just truncate the bytes to the reported length.

@johalun
Copy link
Owner

johalun commented Apr 14, 2022

Can you add a comment about the URL?

@jvimal-eg
Copy link
Contributor Author

@johalun sure, I can do that.

sysctl call can sometimes return fewer bytes than initially indicated,
which seems OK. This approach is also taken by the golang module.
@johalun
Copy link
Owner

johalun commented Apr 14, 2022

Perfect, thanks!

@johalun johalun merged commit 66cf22c into johalun:master Apr 14, 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.

2 participants