cmd: part: use MAX_SEARCH_PARTITIONS for part search
authorKever Yang <kever.yang@rock-chips.com>
Fri, 7 Sep 2018 09:37:36 +0000 (17:37 +0800)
committerTom Rini <trini@konsulko.com>
Tue, 11 Sep 2018 01:19:33 +0000 (21:19 -0400)
Use Macro instead of hard code.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
cmd/part.c

index bee204fff06dddd06a64f484182c220584e72444..bfb6488b0f2b9eb602149181a37291c54370e6da 100644 (file)
@@ -90,7 +90,7 @@ static int do_part_list(int argc, char * const argv[])
                char str[512] = { '\0', };
                disk_partition_t info;
 
-               for (p = 1; p < 128; p++) {
+               for (p = 1; p < MAX_SEARCH_PARTITIONS; p++) {
                        char t[5];
                        int r = part_get_info(desc, p, &info);