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/boot.sh | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) (limited to 'scripts/boot.sh') diff --git a/scripts/boot.sh b/scripts/boot.sh index 99fd103..5b8e6fa 100755 --- a/scripts/boot.sh +++ b/scripts/boot.sh @@ -45,33 +45,21 @@ GUI="" DEBUG="" # ---- args ---- -while [ $# -gt 0 ]; do +source "$SCRIPT_DIR/lib-boot-args.sh" +# boot.sh-specific flags live here; everything else is shared. +handle_arg() { case "$1" in - --gui | -g) GUI="-vga std" ;; - --debug | -d) DEBUG="-s -S" ;; --release | -r) PROFILE="release" CARGO_FLAGS="--release" ;; - --mem) - shift - MEM="$1" - ;; - --smp) - shift - SMP="$1" - ;; - --help | -h) - head -20 "$0" | grep "^#" | sed 's/^# //' - exit 0 - ;; *) echo "unknown: $1" exit 1 ;; esac - shift -done +} +parse_boot_args "$@" OUT_DIR="target/x86_64-unknown-uefi/$PROFILE" KERNEL="$OUT_DIR/rsdos.efi" -- cgit v1.2.3