Skip to content

Gracefully handle missing ioctl on kernel 2.6.x#177

Merged
jeff-hiner merged 3 commits into
emberian:mainfrom
jiggak:fix-crash-kernel-2.6
May 26, 2026
Merged

Gracefully handle missing ioctl on kernel 2.6.x#177
jeff-hiner merged 3 commits into
emberian:mainfrom
jiggak:fix-crash-kernel-2.6

Conversation

@jiggak

@jiggak jiggak commented May 25, 2026

Copy link
Copy Markdown
Contributor

Running on Linux 2.6.37 the Device::open() function returns error:

Error: Invalid argument (os error 22)

This change simply checks for the invalid argument error code from eviocgprop call and returns the empty props.

@jiggak

jiggak commented May 25, 2026

Copy link
Copy Markdown
Contributor Author

I should mention I've been running an application with this patch for several weeks now without issue.

@jeff-hiner

Copy link
Copy Markdown
Collaborator

Hey @jiggak, thanks for contributing! Can you run a quick cargo fmt pass on this and push?

@jiggak

jiggak commented May 26, 2026

Copy link
Copy Markdown
Contributor Author

Hey @jiggak, thanks for contributing! Can you run a quick cargo fmt pass on this and push?

Done.

@jeff-hiner

Copy link
Copy Markdown
Collaborator

Looks like src/raw_stream.rs:147 is failing cargo clippy and that needs to pass as well.

@jiggak

jiggak commented May 26, 2026

Copy link
Copy Markdown
Contributor Author

Looks like src/raw_stream.rs:147 is failing cargo clippy and that needs to pass as well.

Done. Sorry, I should have checked the workflow ahead of time to see what checks are being done.

@jeff-hiner

Copy link
Copy Markdown
Collaborator

Not a problem at all. Thanks for the help!

@jeff-hiner jeff-hiner merged commit 411bb53 into emberian:main May 26, 2026
5 checks passed
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