uvc: log response ioctls failures
This commit is contained in:
parent
fb8573d806
commit
04afb7603f
@ -453,7 +453,9 @@ fn send_response(fd: i32, req: libc::c_ulong, payload: &[u8]) -> Result<()> {
|
|||||||
|
|
||||||
let rc = unsafe { libc::ioctl(fd, req, &resp) };
|
let rc = unsafe { libc::ioctl(fd, req, &resp) };
|
||||||
if rc < 0 {
|
if rc < 0 {
|
||||||
return Err(std::io::Error::last_os_error()).context("UVCIOC_SEND_RESPONSE");
|
let err = std::io::Error::last_os_error();
|
||||||
|
eprintln!("[lesavka-uvc] send_response failed: {err}");
|
||||||
|
return Err(err).context("UVCIOC_SEND_RESPONSE");
|
||||||
}
|
}
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
@ -465,7 +467,9 @@ fn send_stall(fd: i32, req: libc::c_ulong) -> Result<()> {
|
|||||||
};
|
};
|
||||||
let rc = unsafe { libc::ioctl(fd, req, &resp) };
|
let rc = unsafe { libc::ioctl(fd, req, &resp) };
|
||||||
if rc < 0 {
|
if rc < 0 {
|
||||||
return Err(std::io::Error::last_os_error()).context("UVCIOC_SEND_RESPONSE(stall)");
|
let err = std::io::Error::last_os_error();
|
||||||
|
eprintln!("[lesavka-uvc] send_stall failed: {err}");
|
||||||
|
return Err(err).context("UVCIOC_SEND_RESPONSE(stall)");
|
||||||
}
|
}
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user