Skip to contentSkip to conversation

avb: Fix error when partition not found

PATCH New schspa 3 participants 3 messages Feb 25, 2021 – Mar 18, 2021

lore
Share & tools
lore

schspa

author
#0 lore raw

PATCH 1/1 avb: Fix error when partition not found

part_get_info_by_name will return -1 on error, and >0 on success.

Cc Igor Opaniuk <[email protected]>
---
 common/avb_verify.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
common/avb_verify.c +1 -1
index db10d0f21f..0520a71455 100644
@@ -369,7 +369,7 @@ static struct mmc_part *get_partition(AvbOps *ops, const char *partition)
 	}
 
 	ret = part_get_info_by_name(mmc_blk, partition, &part->info);
-	if (!ret) {
+	if (ret < 0) {
 		printf("Can't find partition '%s'\n", partition);
 		goto err;
 	}
Signature · 1 line
2.24.3 (Apple Git-128)
#1 lore raw

PATCH 1/1 avb: Fix error when partition not found

Hi schspa,

Quoted 23 lines · schspa

part_get_info_by_name will return -1 on error, and >0 on success.

Cc Igor Opaniuk <[email protected]>
---
 common/avb_verify.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
common/avb_verify.c +1 -2
index db10d0f21f..0520a71455 100644
@@ -369,7 +369,7 @@ static struct mmc_part *get_partition(AvbOps *ops, const char *partition)
        }
 
        ret = part_get_info_by_name(mmc_blk, partition, &part->info);
-       if (!ret) {
+       if (ret < 0) {
                printf("Can't find partition '%s'\n", partition);
                goto err;
        }
--
Quoted 2 lines

2.24.3 (Apple Git-128)

Signature · 7 lines
Best regards - Freundliche Gr?sse - Meilleures salutations

Igor Opaniuk
Embedded Software Engineer
T:  +380 938364067
E: igor.opaniuk at foundries.io
W: www.foundries.io
#2 lore raw

PATCH 1/1 avb: Fix error when partition not found

In reply to schspa
Quoted 5 lines · schspa

part_get_info_by_name will return -1 on error, and >0 on success.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210318/1ef229bc/attachment.sig>