]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
cmd: avb: Fix requested partitions list
authorSam Protsenko <semen.protsenko@linaro.org>
Thu, 15 Aug 2019 17:49:47 +0000 (20:49 +0300)
committerTom Rini <trini@konsulko.com>
Thu, 31 Oct 2019 11:22:53 +0000 (07:22 -0400)
The requested_partitions[] array should contain only boot partitions.
Usually it's only 'boot' partition, as can be seen in [1]. Also, seems
like the requested_partitions[] are only used when there is no 'vbmeta'
partition [2], which is not a regular use-case.

Make requested_partitions[] contain only 'boot' partition as it was
supposed to be, and also make that array to be a local in
do_avb_verify_part() function, as nobody else needs that.

[1] https://android.googlesource.com/platform/external/avb/+/5fbb42a189aa/test/avb_slot_verify_unittest.cc#108
[2] https://android.googlesource.com/platform/external/avb/+/5fbb42a189aa/libavb/avb_slot_verify.c#1461

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Reviewed-by: Igor Opaniuk <igor.opaniuk@gmail.com>
cmd/avb.c

index 5bc158252b30e67b2af3e564fa7fbb7f3177e595..d4e8884328980c9cb53a1e8365ec232c36ed4c90 100644 (file)
--- a/cmd/avb.c
+++ b/cmd/avb.c
 #define AVB_BOOTARGS   "avb_bootargs"
 static struct AvbOps *avb_ops;
 
-static const char * const requested_partitions[] = {"boot",
-                                            "system",
-                                            "vendor",
-                                            NULL};
-
 int do_avb_init(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 {
        unsigned long mmc_dev;
@@ -232,6 +227,7 @@ int do_avb_get_uuid(cmd_tbl_t *cmdtp, int flag,
 int do_avb_verify_part(cmd_tbl_t *cmdtp, int flag,
                       int argc, char *const argv[])
 {
+       const char * const requested_partitions[] = {"boot", NULL};
        AvbSlotVerifyResult slot_result;
        AvbSlotVerifyData *out_data;
        char *cmdline;