Fix sff panic deadlock, share the evdev probe, assorted review cleanups
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user