linux: Handle ENOENT from claim_interface

This commit is contained in:
Kevin Mehall 2026-02-17 10:26:04 -07:00
parent 94dffc4311
commit cd593cd871

View file

@ -410,7 +410,9 @@ impl LinuxDevice {
) -> Result<Arc<LinuxInterface>, Error> { ) -> Result<Arc<LinuxInterface>, Error> {
result.map_err(|e| { result.map_err(|e| {
match e { match e {
Errno::INVAL => Error::new_os(ErrorKind::NotFound, "interface not found", e), Errno::INVAL | Errno::NOENT => {
Error::new_os(ErrorKind::NotFound, "interface not found", e)
}
Errno::BUSY => Error::new_os(ErrorKind::Busy, "interface is busy", e), Errno::BUSY => Error::new_os(ErrorKind::Busy, "interface is busy", e),
Errno::NODEV => Error::new_os(ErrorKind::Disconnected, "device disconnected", e), Errno::NODEV => Error::new_os(ErrorKind::Disconnected, "device disconnected", e),
_ => Error::new_os(ErrorKind::Other, "failed to claim interface", e), _ => Error::new_os(ErrorKind::Other, "failed to claim interface", e),