Skip to content

Commit baec055

Browse files
Fix spelling and add a check (#340)
1 parent 093a338 commit baec055

File tree

7 files changed

+23
-13
lines changed

7 files changed

+23
-13
lines changed

.github/workflows/ci.yml

+6
Original file line numberDiff line numberDiff line change
@@ -107,3 +107,9 @@ jobs:
107107
run: cargo semver-checks check-release -p bootloader_api
108108
- name: Check semver
109109
run: cargo semver-checks check-release
110+
111+
typos:
112+
name: Check spelling
113+
runs-on: ubuntu-latest
114+
steps:
115+
- uses: crate-ci/[email protected]

Changelog.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ See our [migration guides](docs/migration/README.md) for details.
202202

203203
# 0.8.2
204204

205-
- Change the way the kernel entry point is called to honor alignement ABI ([#81](https://github.com/rust-osdev/bootloader/pull/81))
205+
- Change the way the kernel entry point is called to honor alignment ABI ([#81](https://github.com/rust-osdev/bootloader/pull/81))
206206

207207
# 0.8.1
208208

@@ -276,7 +276,7 @@ See our [migration guides](docs/migration/README.md) for details.
276276

277277
- The level 4 page table is only recursively mapped if the `recursive_page_table` feature is enabled.
278278
- Rename `BootInfo::p4_table_addr` to `BootInfo::recursive_page_table_addr` (only present if the cargo feature is enabled)
279-
- Remove `From<PhysFrameRange>` implemenations for x86_64 `FrameRange`
279+
- Remove `From<PhysFrameRange>` implementations for x86_64 `FrameRange`
280280
- This only works when the versions align, so it is not a good general solution.
281281
- Remove unimplemented `BootInfo::package` field.
282282
- Make `BootInfo` non-exhaustive so that we can add additional fields later.

_typos.toml

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[default.extend-words]
2+
inout = "inout"
3+
rela = "rela"
4+
hda = "hda"

common/src/entropy.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ fn get_random_64(rd_rand: RdRand) -> Option<u64> {
5454

5555
/// Gather entropy by reading the current time with the `RDTSC` instruction if it's available.
5656
///
57-
/// This function doesn't provide particulary good entropy, but it's better than nothing.
57+
/// This function doesn't provide particularly good entropy, but it's better than nothing.
5858
fn tsc_entropy() -> [u8; 32] {
5959
let mut entropy = [0; 32];
6060

@@ -77,7 +77,7 @@ fn tsc_entropy() -> [u8; 32] {
7777

7878
/// Gather entropy by reading the current count of PIT channel 1-3.
7979
///
80-
/// This function doesn't provide particulary good entropy, but it's always available.
80+
/// This function doesn't provide particularly good entropy, but it's always available.
8181
fn pit_entropy() -> [u8; 32] {
8282
let mut entropy = [0; 32];
8383

common/src/legacy_memory_region.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ where
104104
/// Converts this type to a boot info memory map.
105105
///
106106
/// The memory map is placed in the given `regions` slice. The length of the given slice
107-
/// must be at least the value returned by [`len`] pluse 1.
107+
/// must be at least the value returned by [`len`] plus 1.
108108
///
109109
/// The return slice is a subslice of `regions`, shortened to the actual number of regions.
110110
pub fn construct_memory_map(

common/src/load_kernel.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ where
213213
let mem_size = segment.mem_size();
214214
let file_size = segment.file_size();
215215

216-
// calculate virual memory region that must be zeroed
216+
// calculate virtual memory region that must be zeroed
217217
let zero_start = virt_start_addr + file_size;
218218
let zero_end = virt_start_addr + mem_size;
219219

@@ -297,7 +297,7 @@ where
297297
///
298298
/// Panics if a page is not mapped in `self.page_table`.
299299
fn copy_from(&self, addr: VirtAddr, buf: &mut [u8]) {
300-
// We can't know for sure that contigous virtual address are contigous
300+
// We can't know for sure that contiguous virtual address are contiguous
301301
// in physical memory, so we iterate of the pages spanning the
302302
// addresses, translate them to frames and copy the data.
303303

@@ -334,7 +334,7 @@ where
334334
let start_phys_addr = phys_addr.start_address() + start_offset_in_frame;
335335

336336
// These are the offsets from the start address. These correspond
337-
// to the destionation indices in `buf`.
337+
// to the destination indices in `buf`.
338338
let start_offset_in_buf = Step::steps_between(&addr, &start_copy_address).unwrap();
339339

340340
// Calculate the source slice.
@@ -364,7 +364,7 @@ where
364364
///
365365
/// Panics if a page is not mapped in `self.page_table`.
366366
unsafe fn copy_to(&mut self, addr: VirtAddr, buf: &[u8]) {
367-
// We can't know for sure that contigous virtual address are contigous
367+
// We can't know for sure that contiguous virtual address are contiguous
368368
// in physical memory, so we iterate of the pages spanning the
369369
// addresses, translate them to frames and copy the data.
370370

@@ -401,7 +401,7 @@ where
401401
let start_phys_addr = phys_addr.start_address() + start_offset_in_frame;
402402

403403
// These are the offsets from the start address. These correspond
404-
// to the destionation indices in `buf`.
404+
// to the destination indices in `buf`.
405405
let start_offset_in_buf = Step::steps_between(&addr, &start_copy_address).unwrap();
406406

407407
// Calculate the source slice.
@@ -639,7 +639,7 @@ where
639639
// by a Load segment.
640640
check_is_in_load(elf_file, rela.get_offset())?;
641641

642-
// Calculate the destionation of the relocation.
642+
// Calculate the destination of the relocation.
643643
let addr = self.virtual_address_offset + rela.get_offset();
644644
let addr = VirtAddr::new(addr);
645645

src/disk_image.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -166,9 +166,9 @@ pub enum DiskImageError {
166166
/// An unexpected I/O error occurred
167167
#[error("I/O error: {message}:\n{error}")]
168168
Io {
169-
/// Desciption of the failed I/O operation
169+
/// Description of the failed I/O operation
170170
message: &'static str,
171-
/// The I/O error that occured
171+
/// The I/O error that occurred
172172
error: io::Error,
173173
},
174174
}

0 commit comments

Comments
 (0)