mirror of
https://github.com/rust-vmm/vhost-device.git
synced 2026-01-14 20:05:06 +00:00
scsi: fix minor typos
Signed-off-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
This commit is contained in:
parent
c7d499c788
commit
90a9634d82
@ -16,7 +16,7 @@ Run QEMU:
|
||||
qemu-system-x86_64 ... \
|
||||
-device vhost-user-scsi-pci,num_queues=1,param_change=off,chardev=vus \
|
||||
-chardev socket,id=vus,path=/tmp/vhost-user-scsi.sock \
|
||||
# must match total guest meory
|
||||
# must match total guest memory
|
||||
-object memory-backend-memfd,id=mem,size=384M,share=on \
|
||||
-numa node,memdev=mem
|
||||
```
|
||||
|
||||
@ -758,7 +758,7 @@ impl<T: BlockDeviceBackend> LogicalUnit for BlockDevice<T> {
|
||||
Ok(CmdOutput::ok())
|
||||
}
|
||||
SenseFormat::Descriptor => {
|
||||
// Don't support desciptor format.
|
||||
// Don't support descriptor format.
|
||||
Ok(CmdOutput::check_condition(sense::INVALID_FIELD_IN_CDB))
|
||||
}
|
||||
}
|
||||
|
||||
@ -512,7 +512,7 @@ impl Cdb {
|
||||
let evpd = match cdb[1] {
|
||||
0 => false,
|
||||
1 => true,
|
||||
// obselete or reserved bits set
|
||||
// obsolete or reserved bits set
|
||||
_ => return Err(ParseError::InvalidField),
|
||||
};
|
||||
let page_code_raw = cdb[2];
|
||||
|
||||
@ -49,7 +49,7 @@ impl LogicalUnit for MissingLun {
|
||||
Ok(CmdOutput::ok())
|
||||
}
|
||||
SenseFormat::Descriptor => {
|
||||
// Don't support desciptor format.
|
||||
// Don't support descriptor format.
|
||||
Ok(CmdOutput::check_condition(sense::INVALID_FIELD_IN_CDB))
|
||||
}
|
||||
}
|
||||
|
||||
@ -73,7 +73,7 @@ pub fn respond_standard_inquiry_data(data_in: &mut impl Write) -> io::Result<()>
|
||||
// bits: don't support NormACA, support modern LUN format
|
||||
// INQUIRY data version 2
|
||||
0b0001_0000 | 0x2,
|
||||
91, // additional INQURIY data length
|
||||
91, // additional INQUIRY data length
|
||||
// bunch of feature bits we don't support:
|
||||
0,
|
||||
0,
|
||||
|
||||
@ -50,8 +50,8 @@ fn test_report_luns_empty() {
|
||||
target.add_lun(Box::new(dev));
|
||||
}
|
||||
|
||||
// well-known only and several modes explictly defined to return an empty list
|
||||
// for all but ceratin types of recieving LUNs
|
||||
// well-known only and several modes explicitly defined to return an empty list
|
||||
// for all but ceratin types of receiving LUNs
|
||||
let select_reports = &[0x1, 0x10, 0x11, 0x12];
|
||||
|
||||
for &sr in select_reports {
|
||||
|
||||
@ -36,7 +36,7 @@ fn test_invalid_service_action() {
|
||||
do_command_fail(
|
||||
&mut target,
|
||||
&[
|
||||
0xa3, // MAINTAINANCE IN
|
||||
0xa3, // MAINTENANCE IN
|
||||
0x1f, // vendor specific, unused by us
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
],
|
||||
|
||||
@ -447,7 +447,7 @@ fn test_inquiry() {
|
||||
&[],
|
||||
// some empty comments to get rustfmt to do something vaguely sensible
|
||||
&[
|
||||
0, // accessible; direct acccess block device
|
||||
0, // accessible; direct access block device
|
||||
0, // features
|
||||
0x7, // version
|
||||
0x12, // response data format v2, HiSup = 1
|
||||
|
||||
@ -14,8 +14,8 @@ impl SenseTriple {
|
||||
0x0, 0x0, 0x0, 0x0, // cmd-specific information
|
||||
self.1, // asc
|
||||
self.2, // ascq
|
||||
0x0, // field-replacable unit code
|
||||
0x0, 0x0, 0x0, // sense-key-sepcific information
|
||||
0x0, // field-replaceable unit code
|
||||
0x0, 0x0, 0x0, // sense-key-specific information
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@ -142,7 +142,7 @@ impl VhostUserScsiBackend {
|
||||
}
|
||||
Err(RequestParseError::CouldNotReadGuestMemory(e)) => {
|
||||
// See comment later about errors while writing to guest mem; maybe we at least
|
||||
// got functional write desciptors, so we can report an error
|
||||
// got functional write descriptors, so we can report an error
|
||||
error!("Error reading request from guest memory: {:?}", e);
|
||||
Response::error(ResponseCode::Failure, body_writer.residual())
|
||||
}
|
||||
|
||||
@ -183,7 +183,7 @@ where
|
||||
.current
|
||||
.is_some_and(|current| self.offset >= current.len())
|
||||
{
|
||||
let current = self.current.expect("loop condition ensures existance");
|
||||
let current = self.current.expect("loop condition ensures existence");
|
||||
self.offset -= current.len();
|
||||
self.current = self.iter.next();
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user