[U-Boot] [PATCH] avb: verify: return fail if there is no uuid in partition info

Kever Yang kever.yang at rock-chips.com
Mon Sep 2 08:01:30 UTC 2019


There is not always have uuid in disk_partition_t, we can only get from
partitions info when PARTITION_UUIDS is available.

Signed-off-by: Kever Yang <kever.yang at rock-chips.com>
---

 common/avb_verify.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/common/avb_verify.c b/common/avb_verify.c
index 36898a610f..314c5f7a3e 100644
--- a/common/avb_verify.c
+++ b/common/avb_verify.c
@@ -803,6 +803,7 @@ static AvbIOResult get_unique_guid_for_partition(AvbOps *ops,
 						 char *guid_buf,
 						 size_t guid_buf_size)
 {
+#if CONFIG_IS_ENABLED(PARTITION_UUIDS)
 	struct mmc_part *part;
 	size_t uuid_size;
 
@@ -818,6 +819,9 @@ static AvbIOResult get_unique_guid_for_partition(AvbOps *ops,
 	guid_buf[uuid_size - 1] = 0;
 
 	return AVB_IO_RESULT_OK;
+#else
+	return AVB_IO_RESULT_ERROR_IO;
+#endif
 }
 
 /**
-- 
2.17.1



More information about the U-Boot mailing list