Skip to content

Do not assume /dev/input is present#222

Open
WhatAmISupposedToPutHere wants to merge 1 commit intoAsahiLinux:mainfrom
WhatAmISupposedToPutHere:main
Open

Do not assume /dev/input is present#222
WhatAmISupposedToPutHere wants to merge 1 commit intoAsahiLinux:mainfrom
WhatAmISupposedToPutHere:main

Conversation

@WhatAmISupposedToPutHere
Copy link
Copy Markdown
Member

Let's not make things complicated

Supersedes: #221

Copy link
Copy Markdown
Collaborator

@teohhanhui teohhanhui left a comment

Choose a reason for hiding this comment

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

LGTM, just a nit

Comment thread crates/muvm/src/hidpipe_server.rs
Comment thread crates/muvm/src/hidpipe_server.rs Outdated
Comment thread crates/muvm/src/hidpipe_server.rs Outdated
fs::read_dir("/dev/input/").context("Failed to read \"/dev/input/\" directory")?
{
let dir_ents = match fs::read_dir("/dev/input/") {
Ok(e) => Some(e),
Copy link
Copy Markdown
Collaborator

@teohhanhui teohhanhui Apr 17, 2026

Choose a reason for hiding this comment

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

It's quite confusing to name this e, even if it's referring to directory entries. 😆

(And I love shadowing.)

Suggested change
Ok(e) => Some(e),
Ok(dir_ents) => Some(dir_ents),

It can be absent when running muvm inside of a container

Supersedes: AsahiLinux#221

Suggested-by: Zewei Yang <yangzewei@loongson.cn>
Signed-off-by: Sasha Finkelstein <k@chaosmail.tech>
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