usbip_protocol: add more trace logs
This commit is contained in:
parent
f9246c0f5e
commit
e14e34eae7
1 changed files with 13 additions and 0 deletions
|
|
@ -6,6 +6,7 @@
|
|||
//!
|
||||
//! They are based on the [Linux kernel documentation](https://docs.kernel.org/usb/usbip_protocol.html).
|
||||
|
||||
use log::trace;
|
||||
use std::io::Result;
|
||||
use tokio::io::{AsyncReadExt, AsyncWriteExt};
|
||||
|
||||
|
|
@ -143,6 +144,18 @@ impl UsbIpCommand {
|
|||
));
|
||||
}
|
||||
|
||||
trace!(
|
||||
"Received command: {:#04X} ({}), parsing...",
|
||||
command,
|
||||
match command {
|
||||
OP_REQ_DEVLIST => "OP_REQ_DEVLIST",
|
||||
OP_REQ_IMPORT => "OP_REQ_IMPORT",
|
||||
USBIP_CMD_SUBMIT => "USBIP_CMD_SUBMIT",
|
||||
USBIP_CMD_UNLINK => "USBIP_CMD_UNLINK",
|
||||
_ => "Unknown",
|
||||
}
|
||||
);
|
||||
|
||||
match command {
|
||||
OP_REQ_DEVLIST => {
|
||||
let status = socket.read_u32().await?;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue