linux: Handle ENOENT from claim_interface
This commit is contained in:
parent
94dffc4311
commit
cd593cd871
1 changed files with 3 additions and 1 deletions
|
|
@ -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),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue