Fix sff panic deadlock, share the evdev probe, assorted review cleanups

This commit is contained in:
flamingcow
2026-08-31 15:51:52 -07:00
parent 10d97ee82a
commit e4731c94cd
13 changed files with 205 additions and 272 deletions
+4 -2
View File
@@ -7,6 +7,8 @@ import (
"time"
"golang.org/x/sys/unix"
"g.fc.run/theater/cabletest/internal/evdev"
)
// Running as PID 1 there is nothing underneath us: sysfs and devtmpfs are what
@@ -129,9 +131,9 @@ func waitForTouchscreen() checkResult {
res := checkResult{item: "touchscreen"}
start := time.Now()
for {
f, err := findTouchscreen()
ts, err := evdev.FindTouchscreen(os.O_RDONLY)
if err == nil {
f.Close()
ts.F.Close()
waited := time.Since(start)
if waited < touchPoll {
res.state = "ready"