Files
RedBear-OS/drivers/storage
Red Bear OS 11ef817366 USB: P0 fix — eliminate runtime panics in usbscsid main loop
IMPROVEMENT-PLAN.md §10.1.6: critical safety fix.

usbscsid main.rs had 3 runtime unwrap sites that would panic
the daemon on transient errors:

1. Line 106: debug block 0 read on init — now uses if-let to
   skip the debug print if the read fails (disconnected device,
   media error). The device still registers its scheme.

2. Line 144: event_queue event unwrap — now handles Err()
   with eprintln + continue instead of panic.

3. Line 147: scheme.tick() unwrap — now handles Err()
   with eprintln instead of panic.

Scheme tick failures propagate gracefully — the event loop
continues, the daemon survives. This matches the Linux 7.1
pattern of logging USB errors without crashing the daemon.
2026-07-08 00:31:03 +03:00
..