Skip to content

Commit cd593cd

Browse files
committed
linux: Handle ENOENT from claim_interface
1 parent 94dffc4 commit cd593cd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/platform/linux_usbfs/device.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,9 @@ impl LinuxDevice {
410410
) -> Result<Arc<LinuxInterface>, Error> {
411411
result.map_err(|e| {
412412
match e {
413-
Errno::INVAL => Error::new_os(ErrorKind::NotFound, "interface not found", e),
413+
Errno::INVAL | Errno::NOENT => {
414+
Error::new_os(ErrorKind::NotFound, "interface not found", e)
415+
}
414416
Errno::BUSY => Error::new_os(ErrorKind::Busy, "interface is busy", e),
415417
Errno::NODEV => Error::new_os(ErrorKind::Disconnected, "device disconnected", e),
416418
_ => Error::new_os(ErrorKind::Other, "failed to claim interface", e),

0 commit comments

Comments
 (0)