diff options
author | Ji Luo <ji.luo@nxp.com> | 2018-08-09 16:42:27 +0800 |
---|---|---|
committer | Ji Luo <ji.luo@nxp.com> | 2018-08-21 09:44:34 +0800 |
commit | c2763113af32bdbcf7bf2789b973aaeae33c0b85 (patch) | |
tree | 5e94dda1316c30cfa44a42d83c834224e507ed3e /lib | |
parent | d8e1440bc592550ab0b7fa0aace9517235da62d0 (diff) |
MA-12358 Only dump partition table when it's needed
Sometimes we don't need to dump the whole partition table when
some partition can't be found, only dump the partition table
when it's needed.
Test: Build and boot ok.
Change-Id: I52407f0117b73f4b3656fe2435b08dfc7a349939
Signed-off-by: Ji Luo <ji.luo@nxp.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/avb/fsl/fsl_avb.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/avb/fsl/fsl_avb.c b/lib/avb/fsl/fsl_avb.c index 472c2d9909..64f0a372c5 100644 --- a/lib/avb/fsl/fsl_avb.c +++ b/lib/avb/fsl/fsl_avb.c @@ -70,6 +70,7 @@ static struct blk_desc *get_mmc_desc(void) { pte = fastboot_flash_find_ptn(partition); if (!pte) { ERR("no %s partition\n", partition); + fastboot_flash_dump_ptn(); return AVB_IO_RESULT_ERROR_NO_SUCH_PARTITION; } @@ -153,6 +154,7 @@ fail: pte = fastboot_flash_find_ptn(partition); if (!pte) { ERR("no %s partition\n", partition); + fastboot_flash_dump_ptn(); return AVB_IO_RESULT_ERROR_NO_SUCH_PARTITION; } @@ -276,6 +278,7 @@ fail: pte = fastboot_flash_find_ptn(partition); if (!pte) { ERR("no %s partition\n", partition); + fastboot_flash_dump_ptn(); return AVB_IO_RESULT_ERROR_NO_SUCH_PARTITION; } @@ -401,6 +404,7 @@ AvbIOResult fsl_get_unique_guid_for_partition(AvbOps* ops, pte = fastboot_flash_find_ptn(partition); if (!pte) { ERR("no %s partition\n", partition); + fastboot_flash_dump_ptn(); return AVB_IO_RESULT_ERROR_NO_SUCH_PARTITION; } strncpy(guid_buf, (const char *)pte->uuid, guid_buf_size); @@ -425,6 +429,7 @@ AvbIOResult fsl_get_size_of_partition(AvbOps* ops, pte = fastboot_flash_find_ptn(partition); if (!pte) { ERR("no %s partition\n", partition); + fastboot_flash_dump_ptn(); return AVB_IO_RESULT_ERROR_NO_SUCH_PARTITION; } *out_size_num_bytes = (uint64_t)(pte->length * 512); |