summaryrefslogtreecommitdiffstats
path: root/rsnix/src/fat.rs
diff options
context:
space:
mode:
authorsalmonik <salmonik@tuta.io>2026-08-01 03:47:51 +0200
committersalmonik <salmonik@tuta.io>2026-08-01 03:47:51 +0200
commit7c5603b2fed27be86982665a8b10dcd8f1c5a483 (patch)
treee808380c9411c1847ff12aa2a35c94776b1f5292 /rsnix/src/fat.rs
parentClean up warnings, fix FAT32 multi-cluster dirs, prep for edition 2024 (diff)
downloadrs-dos-7c5603b2fed27be86982665a8b10dcd8f1c5a483.tar.gz
rs-dos-7c5603b2fed27be86982665a8b10dcd8f1c5a483.zip
Bump workspace to edition 2024
- edition = "2024" in the workspace manifest and rsdosedit - extern blocks must be unsafe: interrupts.rs ISR stubs -> unsafe extern "C" - #[no_mangle] -> #[unsafe(no_mangle)] (efi_main, isr_dispatch) - One missed static-mut read in free_list_insert wrapped in an explicit unsafe block (edition 2024 removed the implicit unsafe context inside unsafe fns) - rustfmt reflows for 2024: nested if-lets become let-chains, imports re-sorted, rsdosedit help-screen box rows wrapped No codegen-affecting changes. Validated: cargo check/clippy/fmt clean (host + uefi target), make test-disk PASS, editor round-trip PASS.
Diffstat (limited to 'rsnix/src/fat.rs')
-rw-r--r--rsnix/src/fat.rs6
1 files changed, 1 insertions, 5 deletions
diff --git a/rsnix/src/fat.rs b/rsnix/src/fat.rs
index 13d19df..335a160 100644
--- a/rsnix/src/fat.rs
+++ b/rsnix/src/fat.rs
@@ -153,11 +153,7 @@ fn is_eoc(c: u32) -> bool {
153 153
154fn next_cluster(c: u32) -> Result<u32, ()> { 154fn next_cluster(c: u32) -> Result<u32, ()> {
155 let n = read_fat_entry(c); 155 let n = read_fat_entry(c);
156 if is_eoc(n) { 156 if is_eoc(n) { Err(()) } else { Ok(n) }
157 Err(())
158 } else {
159 Ok(n)
160 }
161} 157}
162 158
163/// Allocate a fresh cluster: mark it EOC in the FAT and zero its data. 159/// Allocate a fresh cluster: mark it EOC in the FAT and zero its data.