uvc: log response ioctls failures

This commit is contained in:
Brad Stein 2026-01-06 05:32:55 -03:00
parent fb8573d806
commit 04afb7603f

View File

@ -453,7 +453,9 @@ fn send_response(fd: i32, req: libc::c_ulong, payload: &[u8]) -> Result<()> {
let rc = unsafe { libc::ioctl(fd, req, &resp) };
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(())
}
@ -465,7 +467,9 @@ fn send_stall(fd: i32, req: libc::c_ulong) -> Result<()> {
};
let rc = unsafe { libc::ioctl(fd, req, &resp) };
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(())
}