diff options
author | Gaurav Shah <gauravsh@google.com> | 2012-10-11 16:44:20 -0700 |
---|---|---|
committer | Gerrit <chrome-bot@google.com> | 2012-10-12 11:12:54 -0700 |
commit | 9bf0d535fefabeb6d04f4c837d1101fb00db08fc (patch) | |
tree | 55bcf14e722c12153d168d5974a09835a6a8882e | |
parent | 212eb98136679320d17ccec6c6ddcbc6ecec8613 (diff) | |
download | vboot-9bf0d535fefabeb6d04f4c837d1101fb00db08fc.tar.gz |
resign_firmwarefd.sh: Fix flag option name
We didn't get bit by this bug because getlong_opt does partial matching
on long option names. So --flag also works.
BUG=none
TEST=resign a test firmware; ensure preamble flag is preserved.
BRANCH=none
Change-Id: Ifd87c627b82468529fe1241be3629198d194027b
Reviewed-on: https://gerrit.chromium.org/gerrit/35350
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Commit-Ready: Gaurav Shah <gauravsh@chromium.org>
Tested-by: Gaurav Shah <gauravsh@chromium.org>
-rwxr-xr-x | scripts/image_signing/resign_firmwarefd.sh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/image_signing/resign_firmwarefd.sh b/scripts/image_signing/resign_firmwarefd.sh index 2dc261bc..578d2826 100755 --- a/scripts/image_signing/resign_firmwarefd.sh +++ b/scripts/image_signing/resign_firmwarefd.sh @@ -68,7 +68,7 @@ DEV_FIRMWARE_DATAKEY=$5 DEV_FIRMWARE_KEYBLOCK=$6 KERNEL_SUBKEY=$7 VERSION=$8 -# This is the --flag in vbutil_firmware. It currently has only two values: +# This is the --flags in vbutil_firmware. It currently has only two values: # 0 for RW-NORMAL firmware, and 1 for RO-NORMAL firmware (search "two_stop # firmware" for more information). PREAMBLE_FLAG=$9 @@ -170,7 +170,7 @@ extract_firmware_image "B" "${temp_root_key}" \ echo "Determining preamble flag from existing firmware" if [ -n "$PREAMBLE_FLAG" ]; then - PREAMBLE_FLAG="--flag $PREAMBLE_FLAG" + PREAMBLE_FLAG="--flags $PREAMBLE_FLAG" else dd if="${SRC_FD}" of="${temp_out_vb}" skip="${fwA_vblock_offset}" bs=1 \ count="${fwA_vblock_size}" 2>/dev/null @@ -180,7 +180,7 @@ else --fv "${temp_fwimage_a}" | grep "Preamble flags:" | sed 's/.*: *//')" || flag="" - [ -z "$flag" ] || PREAMBLE_FLAG="--flag $flag" + [ -z "$flag" ] || PREAMBLE_FLAG="--flags $flag" fi echo "Using firmware preamble flag: $PREAMBLE_FLAG" |