From 1ea2f68e6a9af135e6cb3274fdf28d4ddc5812d5 Mon Sep 17 00:00:00 2001 From: salmonik Date: Sat, 1 Aug 2026 18:25:55 +0200 Subject: fix pi-lens warnings: unwraps, shell SC2046, dup code (fmtbuf/scripts/hexdump/cat/ahci/pci) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - memory.rs: self-test Layout::from_size_align no longer panics — the test fails cleanly on an invalid layout - fat.rs: v() no longer unwraps the active-volume slot — invariant violation logs + halts instead of panicking mid-disk-io - strbuf: shared FmtBuf replaces the duplicated PanicBuf/FmtBuf (main.rs + sched.rs) - test-disk.sh: SC2046 — conditional --fresh arg no longer relies on word splitting - scripts: boot.sh/boot-image.sh share lib-boot-args.sh (dup args loop) - shell: cat/hexdump stdin pairs unified with Option<&str> marker; hexdump format_row folded into format_partial - ahci: read/write_sectors unified behind dma_sectors - pci: config_read/write share config_addr --- scripts/test-disk.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'scripts/test-disk.sh') diff --git a/scripts/test-disk.sh b/scripts/test-disk.sh index 11a9b05..0268fff 100755 --- a/scripts/test-disk.sh +++ b/scripts/test-disk.sh @@ -72,7 +72,11 @@ cargo build --package rsdos --target x86_64-unknown-uefi echo "==> 2/6 deploy to ESP + ensure disk image" mkdir -p "$ESP_DIR/EFI/BOOT" cp target/x86_64-unknown-uefi/debug/rsdos.efi "$ESP_DIR/EFI/BOOT/BOOTX64.EFI" -"$SCRIPT_DIR/mkdisk.sh" $([ "$FRESH" -eq 1 ] && echo --fresh) "$IMG" +if [ "$FRESH" -eq 1 ]; then + "$SCRIPT_DIR/mkdisk.sh" --fresh "$IMG" +else + "$SCRIPT_DIR/mkdisk.sh" "$IMG" +fi echo "==> 3/6 boot QEMU (headless)" kill "$(cat "$QPID" 2>/dev/null)" 2>/dev/null || true -- cgit v1.2.3