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-image.sh | 25 ++----------------------- 1 file changed, 2 insertions(+), 23 deletions(-) (limited to 'scripts/boot-image.sh') diff --git a/scripts/boot-image.sh b/scripts/boot-image.sh index 913e5cb..e8c093c 100755 --- a/scripts/boot-image.sh +++ b/scripts/boot-image.sh @@ -34,29 +34,8 @@ GUI="" DEBUG="" # ---- args ---- -while [ $# -gt 0 ]; do - case "$1" in - --gui | -g) GUI="-vga std" ;; - --debug | -d) DEBUG="-s -S" ;; - --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 +source "$SCRIPT_DIR/lib-boot-args.sh" +parse_boot_args "$@" # ---- build image if missing ---- if [ ! -f "$IMAGE" ]; then -- cgit v1.2.3