cmd: part: use MAX_SEARCH_PARTITIONS for part search

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>
lime2-spi
Kever Yang 6 years ago committed by Tom Rini
parent d22336aad9
commit 7e2951160f
  1. 2
      cmd/part.c

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

Loading…
Cancel
Save