Skip to content

Commit 36d6241

Browse files
immanuwellilstam
authored andcommitted
fix: correct typos in comments
Fix spelling and grammar in comments, doc strings, and error text across the codebase. This corrects typos such as calcuated, accomodate, recieved, occured, and preceeding. It also fixes cases where then was used instead of than in comparisons. Signed-off-by: immanuwell <pchpr.00@list.ru>
1 parent 98dff21 commit 36d6241

8 files changed

Lines changed: 10 additions & 10 deletions

File tree

src/snapshot-editor/src/edit_memory.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ mod tests {
246246
// expected: [d] [b] [d] [d] [b]
247247
let base_block = rand::rand_bytes(block_size);
248248
// Adding to the base file 2 times because
249-
// it is 1 block smaller then diff right now.
249+
// it is 1 block smaller than diff right now.
250250
base_file.write_all(&base_block).unwrap();
251251
base_file.write_all(&base_block).unwrap();
252252
expected_result.extend(base_block);

src/vmm/src/arch/aarch64/regs.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ pub const KVM_REG_ARM64_SVE_VLS: u64 =
127127
KVM_REG_ARM64 | KVM_REG_ARM64_SVE as u64 | KVM_REG_SIZE_U512 | 0xffff;
128128

129129
/// Program Counter
130-
/// The offset value (0x100 = 32 * 8) is calcuated as follows:
130+
/// The offset value (0x100 = 32 * 8) is calculated as follows:
131131
/// - `kvm_regs` includes `regs` field of type `user_pt_regs` at the beginning (i.e., at offset 0).
132132
/// - `pc` follows `regs[31]` and `sp` within `user_pt_regs` and they are 8 bytes each (i.e. the
133133
/// offset is (31 + 1) * 8 = 256).
@@ -196,7 +196,7 @@ impl From<usize> for RegSize {
196196
RegSize::U512_SIZE => RegSize::U512,
197197
RegSize::U1024_SIZE => RegSize::U1024,
198198
RegSize::U2048_SIZE => RegSize::U2048,
199-
_ => unreachable!("Registers bigger then 2048 bits are not supported"),
199+
_ => unreachable!("Registers bigger than 2048 bits are not supported"),
200200
}
201201
}
202202
}

src/vmm/src/cpu_config/x86_64/cpuid/amd/normalize.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ impl super::AmdCpuid {
214214
/// This value allows at most 64 logical threads within a package.
215215
const THREAD_ID_MAX_SIZE: u32 = 7;
216216

217-
// We don't support more then 128 threads right now.
217+
// We don't support more than 128 threads right now.
218218
// It's safe to put them all on the same processor.
219219
let leaf_80000008 = self
220220
.get_mut(&CpuidKey::leaf(0x80000008))

src/vmm/src/devices/virtio/balloon/device.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ fn default_ack_on_stop() -> bool {
9292
true
9393
}
9494

95-
/// Command recieved from the API to start a hinting run
95+
/// Command received from the API to start a hinting run
9696
#[derive(Copy, Clone, Debug, Eq, PartialEq, Deserialize)]
9797
pub struct StartHintingCmd {
9898
/// If we should automatically acknowledge end of the run after stop.

src/vmm/src/devices/virtio/net/metrics.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ static METRICS: RwLock<NetMetricsPerDevice> = RwLock::new(NetMetricsPerDevice {
126126
pub fn flush_metrics<S: Serializer>(serializer: S) -> Result<S::Ok, S::Error> {
127127
let net_metrics = METRICS.read().unwrap();
128128
let metrics_len = net_metrics.metrics.len();
129-
// +1 to accomodate aggregate net metrics
129+
// +1 to accommodate aggregate net metrics
130130
let mut seq = serializer.serialize_map(Some(1 + metrics_len))?;
131131

132132
let mut net_aggregated: NetDeviceMetrics = NetDeviceMetrics::default();

src/vmm/src/devices/virtio/vsock/unix/muxer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ impl VsockEpollListener for VsockMuxer {
282282
EventSet::IN
283283
}
284284

285-
/// Notify the muxer about a pending event having occured under its nested epoll FD.
285+
/// Notify the muxer about a pending event having occurred under its nested epoll FD.
286286
fn notify(&mut self, _: EventSet) {
287287
let mut epoll_events = vec![EpollEvent::new(EventSet::empty(), 0); 32];
288288
match self.epoll.wait(0, epoll_events.as_mut_slice()) {

src/vmm/src/mmds/ns.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ impl MmdsNetworkStack {
140140
///
141141
/// # Returns
142142
///
143-
/// `true` if the frame was consumed by `mmds` or `false` if an error occured
143+
/// `true` if the frame was consumed by `mmds` or `false` if an error occurred
144144
pub fn detour_frame(&mut self, src: &[u8]) -> bool {
145145
if let Ok(eth) = EthernetFrame::from_bytes(src) {
146146
match eth.ethertype() {

src/vmm/src/snapshot/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ pub enum SnapshotError {
5757
InvalidFormatVersion(Version),
5858
/// Magic value does not match arch: {0}
5959
InvalidMagic(u64),
60-
/// An error occured during bitcode serialization: {0}
60+
/// An error occurred during bitcode serialization: {0}
6161
Bitcode(#[from] bitcode::Error),
6262
/// IO Error: {0}
6363
Io(#[from] std::io::Error),
@@ -206,7 +206,7 @@ impl<Data: DeserializeOwned> Snapshot<Data> {
206206
let computed_checksum = crc64(0, buf.as_slice());
207207
// When we read the entire file, we also read the checksum into the buffer. The CRC has the
208208
// property that crc(0, buf.as_slice()) == 0 iff the last 8 bytes of buf are the checksum
209-
// of all the preceeding bytes, and this is the property we are using here.
209+
// of all the preceding bytes, and this is the property we are using here.
210210
if computed_checksum != 0 {
211211
return Err(SnapshotError::Crc64);
212212
}

0 commit comments

Comments
 (0)