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

Consider only making fields optional if they were added after Linux 2.6 #68

Open
cjbassi opened this issue Mar 14, 2020 · 2 comments
Open

Comments

@cjbassi
Copy link

cjbassi commented Mar 14, 2020

The docs say that this library intends to support Linux versions greater than 2.6. Would it make sense to only make fields optional if they were added after 2.6? Anything before 2.6 is pretty old, and from my experience with rust-psutil, there's a lack of documentation and a lot of missing features from kernels older than 2.6.

edit: This would be a breaking change, and would require some changes to struct parsing too, but would also make things a lot simpler.

@eminence
Copy link
Owner

In general, yes the idea is that fields added in newer kernels become a Option in the procfs structs. The stat struct is good example.

What I think you're asking about is some really old fields (like exit_signal or processor) that were added in Linux 2.1 or 2.2 (which is way before 2.6). Is that right?

I suppose I don't have any major objection to make a breaking change like this. I'm not sure if I'd want to do it right now. But if we had to make another breaking change then turning some of these fields into non-Option would make sense.

@cjbassi
Copy link
Author

cjbassi commented Mar 27, 2020

Yeah, any fields that existed before 2.6 should not be options.

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

No branches or pull requests

2 participants