diff options
author | Leah Rowe <leah@libreboot.org> | 2025-05-09 20:54:23 +0100 |
---|---|---|
committer | Leah Rowe <leah@libreboot.org> | 2025-05-09 20:54:23 +0100 |
commit | 81dbde7e09f06c7f227fd0d78498df6e1c269f84 (patch) | |
tree | a3da8fe6888d2b226e86b4e13f254a03a7d7c116 /include/mrc.sh | |
parent | 14d46abceda7a7ad6081b6ab321fb0efb4bc3325 (diff) |
lbmk: use x_ instead of err, where appropriate
many places in lbmk used err, because older versions
of x_ did not handle globbing properly.
however, use of x_ is preferable on trivial commands.
the only time err() should be called is what it has
to be, when x_ can't work, or when a more useful error
message is needed, for context.
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'include/mrc.sh')
-rw-r--r-- | include/mrc.sh | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/include/mrc.sh b/include/mrc.sh index edd35414..3b3089fc 100644 --- a/include/mrc.sh +++ b/include/mrc.sh @@ -10,8 +10,8 @@ extract_mrc() { extract_shellball - "$cbfstool" "$appdir/"bios.bin extract -n mrc.bin \ - -f "$_dest" -r RO_SECTION || err "extract_mrc: !$cbfstool $_dest" + x_ "$cbfstool" "$appdir/"bios.bin extract -n mrc.bin \ + -f "$_dest" -r RO_SECTION [ -n "$CONFIG_REFCODE_BLOB_FILE" ] && extract_refcode extra; : } @@ -27,7 +27,7 @@ extract_refcode() # and refcode is extracted from an image using the old scheme. we use # cbfstool from coreboot 4.11_branch, the tree used by ASUS KGPE-D16 chkvars cbfstoolref - mkdir -p "${_refdest%/*}" || err "ref: !mkdir -p ${_refdest%/*}" + x_ mkdir -p "${_refdest%/*}" x_ "$cbfstoolref" "$appdir/bios.bin" extract \ -m x86 -n fallback/refcode -f "$appdir/ref" -r RO_SECTION @@ -60,8 +60,8 @@ extract_partition() START=$(( $( echo $ROOTP | cut -f2 -d\ | tr -d "B" ) )) SIZE=$(( $( echo $ROOTP | cut -f4 -d\ | tr -d "B" ) )) - dd if="${1%.zip}" of="root-a.ext2" bs=1024 skip=$(( $START / 1024 )) \ - count=$(( $SIZE / 1024 )) || err "ex dd ${1%.zip}, root-a.ext2" + x_ dd if="${1%.zip}" of="root-a.ext2" bs=1024 skip=$(( $START / 1024 )) \ + count=$(( $SIZE / 1024 )) printf "cd /usr/sbin\ndump chromeos-firmwareupdate %s\nquit" \ "$SHELLBALL" | debugfs "root-a.ext2" || err "!extract shellball" |