summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulius Werner <jwerner@chromium.org>2021-10-13 18:01:48 -0700
committerCommit Bot <commit-bot@chromium.org>2021-10-19 02:40:27 +0000
commit67c2f4772db32766707a51bcb7a197be3d354f17 (patch)
tree51ce37c6b48882aeaaf3f69eacef85c049822251
parent06780662c89b05684a934ea3a1538df02f512e1c (diff)
downloadvboot-firmware-cr50-stab-mp-14300.B.tar.gz
chromeos-tpm-recovery: Quote local variablesfirmware-cr50-stab-mp-14300.Bfirmware-cr50-stab-14294.B
The strings in these variables usually don't contain any spaces, but on some non-Google boards (e.g. Intel RVP) they do, so let's follow the usual shell style and quote all the things. BRANCH=none BUG=b:202870010 TEST=None Signed-off-by: Julius Werner <jwerner@chromium.org> Change-Id: I90fac5c605c38eec704df0241d822a19210bfdf9 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3221956 Reviewed-by: Andrey Pronin <apronin@chromium.org> Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
-rwxr-xr-xutility/chromeos-tpm-recovery6
1 files changed, 3 insertions, 3 deletions
diff --git a/utility/chromeos-tpm-recovery b/utility/chromeos-tpm-recovery
index ac7dfcc9..12616b41 100755
--- a/utility/chromeos-tpm-recovery
+++ b/utility/chromeos-tpm-recovery
@@ -30,9 +30,9 @@ tpm2_target() {
}
use_v0_secdata_kernel() {
- local fwid=$(crossystem ro_fwid)
- local major=$(printf "$fwid" | cut -d. -f2)
- local minor=$(printf "$fwid" | cut -d. -f3)
+ local fwid="$(crossystem ro_fwid)"
+ local major="$(printf "$fwid" | cut -d. -f2)"
+ local minor="$(printf "$fwid" | cut -d. -f3)"
# TPM1 firmware never supports the v1 kernel space format.
if ! tpm2_target; then