Fall back to plain files when mknod is unavailable - #175
Draft
LoneAngelFayt wants to merge 1 commit into
Draft
Conversation
There was a problem hiding this comment.
Thanks for opening this pull request! Be sure to follow the pull request template!
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description:
Adds an
elifbranch to the gamepad block ininit-selkies-config/runthat falls back to plain files whenmknodis not available, gated ontouch /dev/input/js0the same way the existing block is gated onmknod /dev/input/js0.Benefits of this PR and context:
Under rootless podman there is no CAP_MKNOD, and the kernel refuses device nodes inside a userns anyway, so the
mknodfails and the whole block drops to the else branch. That setsSELKIES_GAMEPAD_ENABLED=falseand never writesLD_PRELOADinto container_environment, so gamepads are dead in every app and nothing logs why.Empty files are enough here because the joystick interposer hooks
open()on the path name and the fake libudev handles enumeration, so nothing ever opens the real node.How Has This Been Tested?
Rootless podman on Fedora 43, running the webstation image. Before the change
/dev/inputis empty and/run/s6/container_environment/LD_PRELOADdoes not exist. After it, the js/event files are created,LD_PRELOADis set, and the gamepad env vars stay at their defaults. Verified controller input reaching PCSX2 through the browser, with connections on/tmp/selkies_js*.sock.Also checked the rootful path is untouched: with
mknodavailable the first branch still wins and theelifnever runs.Source / References:
n/a