diff options
author | Pali Rohár <pali@kernel.org> | 2021-08-02 16:18:30 +0300 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-09-17 19:10:44 +0300 |
commit | fa9c5da70206621b42530e58882680fb1c4079cd (patch) | |
tree | e49efa5344b6b4cca48d1e98c4464d30c4e2b07a /lib | |
parent | a79f82331437909c8f99217c616bb17e26013448 (diff) | |
download | u-boot-fa9c5da70206621b42530e58882680fb1c4079cd.tar.xz |
efi_loader: Use directly version_string variable
Macro U_BOOT_VERSION_STRING is already stored in variable version_string.
So use directly this variable instead of storing U_BOOT_VERSION_STRING into
temporary variable.
Signed-off-by: Pali Rohár <pali@kernel.org>
[trini: This area was reworked since posted, what is here is now really
inspired by the previous version, so drop Ilias' Acked-by]
Signed-off-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/efi_loader/efi_tcg2.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/efi_loader/efi_tcg2.c b/lib/efi_loader/efi_tcg2.c index cb48919223..578b69e38f 100644 --- a/lib/efi_loader/efi_tcg2.c +++ b/lib/efi_loader/efi_tcg2.c @@ -1337,10 +1337,11 @@ out: */ static efi_status_t efi_append_scrtm_version(struct udevice *dev) { - u8 ver[] = U_BOOT_VERSION_STRING; efi_status_t ret; - ret = tcg2_measure_event(dev, 0, EV_S_CRTM_VERSION, sizeof(ver), ver); + ret = tcg2_measure_event(dev, 0, EV_S_CRTM_VERSION, + strlen(version_string) + 1, + (u8 *)version_string); return ret; } |