Fix all spelling mistakes in history by typos tool

This commit is contained in:
Cautreoxit
2024-08-26 15:31:58 +08:00
committed by Tate, Hongliang Tian
parent b29d3b5409
commit 86f09eef75
120 changed files with 255 additions and 213 deletions

View File

@ -188,7 +188,7 @@ impl InputDevice {
fn handle_irq(&self) {
let callbacks = self.callbacks.read_irq_disabled();
// Returns ture if there may be more events to handle
// Returns true if there may be more events to handle
let handle_event = |event: &EventBuf| -> bool {
event.sync().unwrap();
let event: VirtioInputEvent = event.read().unwrap();

View File

@ -61,7 +61,7 @@ impl SocketDevice {
<< 32;
let mut recv_queue = VirtQueue::new(QUEUE_RECV, QUEUE_SIZE, transport.as_mut())
.expect("createing recv queue fails");
.expect("creating recv queue fails");
let send_queue = VirtQueue::new(QUEUE_SEND, QUEUE_SIZE, transport.as_mut())
.expect("creating send queue fails");
let event_queue = VirtQueue::new(QUEUE_EVENT, QUEUE_SIZE, transport.as_mut())

View File

@ -103,7 +103,7 @@ impl fmt::Display for SocketError {
Self::UnexpectedDataInPacket => write!(f, "No data is expected in the packet"),
Self::InsufficientBufferSpaceInPeer => write!(f, "Peer has insufficient buffer space, try again later"),
Self::RecycledWrongBuffer => write!(f, "Recycled a wrong buffer"),
Self::QueueError(_) => write!(f,"Error encounted out of vsock itself!"),
Self::QueueError(_) => write!(f,"Error encountered out of vsock itself!"),
}
}
}

View File

@ -106,7 +106,7 @@ fn negotiate_features(transport: &mut Box<dyn VirtioTransport>) {
}
bitflags! {
/// all device features, bits 0~23 and 50~63 are sepecified by device.
/// all device features, bits 0~23 and 50~63 are specified by device.
/// if using this struct to translate u64, use from_bits_truncate function instead of from_bits
///
struct Feature: u64 {

View File

@ -73,7 +73,7 @@ impl VirtQueue {
let (descriptor_ptr, avail_ring_ptr, used_ring_ptr) = if transport.is_legacy_version() {
// FIXME: How about pci legacy?
// Currently, we use one Frame to place the descriptors and avaliable rings, one Frame to place used rings
// Currently, we use one Frame to place the descriptors and available rings, one Frame to place used rings
// because the virtio-mmio legacy required the address to be continuous. The max queue size is 128.
if size > 128 {
return Err(QueueError::InvalidArgs);

View File

@ -62,7 +62,7 @@ impl VirtioPciCapabilityData {
3 => VirtioPciCpabilityType::IsrCfg,
4 => VirtioPciCpabilityType::DeviceCfg,
5 => VirtioPciCpabilityType::PciCfg,
_ => panic!("Unsupport virtio capability type:{:?}", cfg_type),
_ => panic!("Unsupported virtio capability type:{:?}", cfg_type),
};
let bar = vendor_cap.read8(4).unwrap();
let capability_length = vendor_cap.read8(2).unwrap();