mirror of
https://github.com/rust-vmm/vhost-device.git
synced 2025-12-28 16:29:45 +00:00
can: fix minor typos
Signed-off-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
This commit is contained in:
parent
eed437ca9a
commit
5a0ce5585e
@ -166,7 +166,7 @@ impl CanController {
|
||||
}
|
||||
};
|
||||
|
||||
// Set non-blocking otherwise the device will not restart immediatelly
|
||||
// Set non-blocking otherwise the device will not restart immediately
|
||||
// when the VM closes, and a new canfd message needs to be received for
|
||||
// restart to happen.
|
||||
// This caused by the fact that the thread is stacked in read function
|
||||
@ -257,7 +257,7 @@ impl CanController {
|
||||
}
|
||||
};
|
||||
|
||||
// Grab the data to be tranfered
|
||||
// Grab the data to be transferred
|
||||
let data_len = tx_request.length.to_native() as usize;
|
||||
let data: Vec<u8> = tx_request.sdu.iter().cloned().take(data_len).collect();
|
||||
|
||||
|
||||
@ -775,13 +775,13 @@ mod tests {
|
||||
// Empty descriptor chain should be ignored
|
||||
assert!(vu_can_backend
|
||||
.process_rx_requests(Vec::<CanDescriptorChain>::new(), &vring)
|
||||
.expect("Fail to examin empty rx vring"));
|
||||
.expect("Fail to examine empty rx vring"));
|
||||
assert!(vu_can_backend
|
||||
.process_tx_requests(Vec::<CanDescriptorChain>::new(), &vring)
|
||||
.expect("Fail to examin empty tx vring"));
|
||||
.expect("Fail to examine empty tx vring"));
|
||||
assert!(vu_can_backend
|
||||
.process_ctrl_requests(Vec::<CanDescriptorChain>::new(), &vring)
|
||||
.expect("Fail to examin empty ctrl vring"));
|
||||
.expect("Fail to examine empty ctrl vring"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
@ -930,7 +930,7 @@ mod tests {
|
||||
|
||||
assert_eq!(VIRTIO_CAN_RESULT_NOT_OK, can_frame_res);
|
||||
|
||||
// Test 4: Successfull test for VIRTIO_CAN_SET_CTRL_MODE_START
|
||||
// Test 4: Successful test for VIRTIO_CAN_SET_CTRL_MODE_START
|
||||
let can_mes_len = size_of::<VirtioCanCtrlRequest>();
|
||||
let desc_chain = build_desc_chain_mem(
|
||||
&mem,
|
||||
@ -966,7 +966,7 @@ mod tests {
|
||||
|
||||
assert_eq!(VIRTIO_CAN_RESULT_OK, can_frame_res);
|
||||
|
||||
// Test 5: Successfull test for VIRTIO_CAN_SET_CTRL_MODE_STOP
|
||||
// Test 5: Successful test for VIRTIO_CAN_SET_CTRL_MODE_STOP
|
||||
let can_mes_len = size_of::<VirtioCanCtrlRequest>();
|
||||
let desc_chain = build_desc_chain_mem(
|
||||
&mem,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user