From c04fc970e5d9b0c82ae2923af88ad870a74608af Mon Sep 17 00:00:00 2001 From: salmonik Date: Sat, 1 Aug 2026 15:08:29 +0200 Subject: rsnix: formatting --- rsnix/src/ahci.rs | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'rsnix/src/ahci.rs') diff --git a/rsnix/src/ahci.rs b/rsnix/src/ahci.rs index 9ed803d..72da07d 100644 --- a/rsnix/src/ahci.rs +++ b/rsnix/src/ahci.rs @@ -262,10 +262,14 @@ pub fn init() -> bool { continue; } let det = reg(abar as usize + PORT_BASE + port_idx as usize * PORT_STRIDE + P_SSTS) & 0xF; - unsafe { PORT_UP[port_idx as usize] = det == 3; } + unsafe { + PORT_UP[port_idx as usize] = det == 3; + } if let Some(d) = start_port(abar as usize, port_idx) { // The device answered IDENTIFY — it's definitely present. - unsafe { PORT_UP[port_idx as usize] = true; } + unsafe { + PORT_UP[port_idx as usize] = true; + } if !place_disk(d) { crate::serial_println!("ahci: port {} up but disk table full", port_idx); } @@ -341,7 +345,9 @@ pub fn rescan() -> (usize, usize) { .iter() .position(|d| d.is_some_and(|d| d.port_idx == port_idx)); let up_prev = unsafe { PORT_UP[port_idx as usize] }; - unsafe { PORT_UP[port_idx as usize] = up; } + unsafe { + PORT_UP[port_idx as usize] = up; + } if up == up_prev { continue; } @@ -356,7 +362,9 @@ pub fn rescan() -> (usize, usize) { } } else if let Some(i) = slot { // Removal: tombstone the slot; indices stay stable. - unsafe { DISKS[i] = None; } + unsafe { + DISKS[i] = None; + } crate::serial_println!("ahci: port {} down — device removed", port_idx); removed += 1; } -- cgit v1.2.3