From b71594857597eb69d3bea599a5b79341d0da02fd Mon Sep 17 00:00:00 2001 From: Philipp Schuster Date: Thu, 4 Apr 2024 10:09:53 +0200 Subject: [PATCH] misc: init typos for spell checking --- .editorconfig | 2 +- .typos.toml | 22 ++++++++++++++++++++++ ChangeLog | 4 ++-- common/lib/acpi.c | 6 +++--- common/lib/uri.c | 2 +- common/mm/vmm.c | 2 +- common/protos/multiboot2.c | 2 +- flake.nix | 2 +- nix/build.nix | 4 ++-- test/multiboot.c | 2 +- test/multiboot2.c | 2 +- 11 files changed, 36 insertions(+), 14 deletions(-) create mode 100644 .typos.toml diff --git a/.editorconfig b/.editorconfig index f5f595f3..fa73dbbf 100644 --- a/.editorconfig +++ b/.editorconfig @@ -14,5 +14,5 @@ max_line_length = 80 [{Makefile,GNUmakefile*}] indent_style = tab -[{*.nix,*.yml}] +[{*.nix,*.toml,*.yml}] indent_size = 2 diff --git a/.typos.toml b/.typos.toml new file mode 100644 index 00000000..88d0ee03 --- /dev/null +++ b/.typos.toml @@ -0,0 +1,22 @@ +# Configuration for https://github.com/crate-ci/typos + +[files] +extend-exclude = [ + # Typos already uses .gitignore. These excludes are additional: +] + +[default.extend-words] +hda = "hda" +Nd = "Nd" +sie = "sie" +SIE = "SIE" +ist = "ist" +rela = "rela" +RELA = "RELA" +guid = "guid" +GUID = "GUID" +pn = "pn" +hd = "hd" +htpt = "htpt" + +[default.extend-identifiers] diff --git a/ChangeLog b/ChangeLog index 78531aad..8d7042e9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -78,7 +78,7 @@ Bug fixes: - multiboot2 protocol: Do not panic if there is a ENTRY_ADDRESS_EFI64 - tag, but there is a valid alternatve entry point. This further aligns + tag, but there is a valid alternative entry point. This further aligns our behaviour with GRUB2. Miscellaneous: @@ -128,7 +128,7 @@ Bug fixes: - Minor fix of newline handling when reading user input lines. - Miscellanous: + Miscellaneous: - Bump major version to 7. Note: There is no breaking change in 7.x compared to 6.x; the major version bump is done due to a change in the versioning scheme used by Limine (move to proper Semantic diff --git a/common/lib/acpi.c b/common/lib/acpi.c index d9dbde25..f7c88308 100644 --- a/common/lib/acpi.c +++ b/common/lib/acpi.c @@ -34,7 +34,7 @@ void *acpi_get_rsdp(void) { return NULL; } -/// Returns the RSDP v1 pointer if avaliable or else NULL. +/// Returns the RSDP v1 pointer if available or else NULL. void *acpi_get_rsdp_v1(void) { // In BIOS according to the ACPI spec (see ACPI 6.2 section // 5.2.5.1 'Finding the RSDP on IA-PC Systems') it either contains @@ -120,7 +120,7 @@ void *acpi_get_rsdp(void) { return rsdp; } -/// Returns the RSDP v1 pointer if avaliable or else NULL. +/// Returns the RSDP v1 pointer if available or else NULL. void *acpi_get_rsdp_v1(void) { // To maintain GRUB compatibility we will need to probe for the RSDP // again since UEFI can contain both XSDP and RSDP (see ACPI 6.2 section @@ -188,7 +188,7 @@ void acpi_get_smbios(void **smbios32, void **smbios64) { #endif -/// Returns the RSDP v2 pointer if avaliable or else NULL. +/// Returns the RSDP v2 pointer if available or else NULL. void *acpi_get_rsdp_v2(void) { // Since the acpi_get_rsdp function already looks for the XSDP we can // just check if it has the correct revision and return the pointer :^) diff --git a/common/lib/uri.c b/common/lib/uri.c index a4eed0b5..a171d5cd 100644 --- a/common/lib/uri.c +++ b/common/lib/uri.c @@ -14,7 +14,7 @@ #include // A URI takes the form of: resource://root/path#hash -// The following function splits up a URI into its componenets +// The following function splits up a URI into its components bool uri_resolve(char *uri, char **resource, char **root, char **path, char **hash) { size_t length = strlen(uri) + 1; char *buf = ext_mem_alloc(length); diff --git a/common/mm/vmm.c b/common/mm/vmm.c index 2a7355f0..2029a7e8 100644 --- a/common/mm/vmm.c +++ b/common/mm/vmm.c @@ -96,7 +96,7 @@ level4: pml3 = get_next_level(pagemap, pml4, virt_addr, pg_size, 3, pml4_entry); if (pg_size == Size1GiB) { - // Check if 1GiB pages are avaliable. + // Check if 1GiB pages are available. if (is_1gib_page_supported()) { pml3[pml3_entry] = (pt_entry_t)(phys_addr | flags | PT_FLAG_LARGE); } else { diff --git a/common/protos/multiboot2.c b/common/protos/multiboot2.c index 14697b73..c67fd95a 100644 --- a/common/protos/multiboot2.c +++ b/common/protos/multiboot2.c @@ -743,7 +743,7 @@ skip_modeset:; // NOTE: The multiboot2 specification does not say anything about if both // smbios 32 and 64 bit entry points are present, then we pass both of them + smbios // support for grub2 is unimplemented. So, we are going to assume they expect us to - // pass both of them if avaliable. Oh well... + // pass both of them if available. Oh well... if (smbios_entry_32 != NULL) { struct multiboot_tag_smbios *tag = (struct multiboot_tag_smbios *)(mb2_info + info_idx); diff --git a/flake.nix b/flake.nix index 4c20c0ab..d19efefa 100644 --- a/flake.nix +++ b/flake.nix @@ -39,7 +39,7 @@ nasm pkg-config # Checked for by ./configure but seems unused? - # gcc toolchain (comes as default, here only for completness) + # gcc toolchain (comes as default, here only for completeness) binutils gcc gnumake diff --git a/nix/build.nix b/nix/build.nix index 160a8261..a159e96e 100644 --- a/nix/build.nix +++ b/nix/build.nix @@ -7,7 +7,7 @@ # stable release. Further, unlike the nixpkgs derivation, this derivation runs # the ./bootstrap step which needs network access. Due to the nature of the # self-hacked Git submodules download approach, packaging this project in Nix -# is especailly complicated. The complicated multi-derivation approach below +# is especially complicated. The complicated multi-derivation approach below # is the best I can get after multiple hours of trying. :). { @@ -84,7 +84,7 @@ let # derivation in a non-deterministic way. fd -u --type=d "^.git$" --min-depth=2 . --exec rm -rf {} - # This should report nothing. Othewise, the Nix build will fail. + # This should report nothing. Otherwise, the Nix build will fail. # grep -r /nix/store . runHook postBuild diff --git a/test/multiboot.c b/test/multiboot.c index 32bfccbc..b1fd8e7a 100644 --- a/test/multiboot.c +++ b/test/multiboot.c @@ -42,7 +42,7 @@ void multiboot_main(uint32_t magic, struct multiboot1_info *info) { // For now we only print the usable memory map entries since // printing the whole memory map blows my terminal up. We also - // iterate through the avaliable memory map entries and add up + // iterate through the available memory map entries and add up // to find the total amount of usable memory. for (struct multiboot1_mmap_entry* entry = start; entry < end; entry++) { // Check if the memory map entry is marked as usable! diff --git a/test/multiboot2.c b/test/multiboot2.c index 34428541..9294b6b7 100644 --- a/test/multiboot2.c +++ b/test/multiboot2.c @@ -92,7 +92,7 @@ void multiboot2_main(uint32_t magic, struct multiboot_info* mb_info_addr) { // For now we only print the usable memory map entries since // printing the whole memory map blows my terminal up. We also - // iterate through the avaliable memory map entries and add up + // iterate through the available memory map entries and add up // to find the total amount of usable memory. for (size_t i = 0; i < entry_count; i++) { e9_printf("\t\t\t addr=%x", m[i].addr);