summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorAmey Deshpande <ameyd@google.com>2016-03-08 12:05:53 -0800
committerchrome-bot <chrome-bot@chromium.org>2016-03-08 19:43:11 -0800
commit65f61f90ccae5f0b5f37ea3bdf86735bc58709a0 (patch)
tree60c1112de026c06994c10c5199050c547a30c224 /scripts
parentd187cd3fc792f8bcefbee4587c83eafbd08441fc (diff)
downloadvboot-65f61f90ccae5f0b5f37ea3bdf86735bc58709a0.tar.gz
signer: improve error handling in update_legacy_bootloader()stabilize-8104.Bfactory-oak-8141.B
BRANCH=None BUG=chromium:590933 TEST=Ran sign_official_build.sh locally and booted the image on kvm (using BIOS). $ ./sign_official_build.sh base chromiumos_base_image.bin \ ../../tests/devkeys chromiumos_base_image_signed.bin Change-Id: I2e1aad6e2073dea8e92d6ee25ac6972a5d555d71 Reviewed-on: https://chromium-review.googlesource.com/331661 Commit-Ready: Amey Deshpande <ameyd@google.com> Tested-by: Amey Deshpande <ameyd@google.com> Reviewed-by: Mike Frysinger <vapier@chromium.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/image_signing/sign_official_build.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/image_signing/sign_official_build.sh b/scripts/image_signing/sign_official_build.sh
index a3f7c98e..83f31c6f 100755
--- a/scripts/image_signing/sign_official_build.sh
+++ b/scripts/image_signing/sign_official_build.sh
@@ -714,7 +714,11 @@ update_legacy_bootloader() {
local esp_dir="$(make_temp_dir)"
# We use the 'unsafe' variant because the EFI system partition is vfat type
# and can be mounted in RW mode.
- _mount_image_partition_retry "${image}" "${esp_partnum}" "${esp_dir}"
+ if ! _mount_image_partition_retry "${image}" "${esp_partnum}" \
+ "${esp_dir}"; then
+ error "Could not mount EFI partition for updating legacy bootloader cfg."
+ return 1
+ fi
# If we can't find the dm parameter in the kernel config, bail out now.
local kernel_config=$(grab_kernel_config "${image}" "${dm_partno}")