Nico Huber has posted comments on this change. ( https://review.coreboot.org/23203 )
Change subject: Add support to get layout from fmap (e.g. coreboot rom) ......................................................................
Patch Set 19:
(2 comments)
https://review.coreboot.org/#/c/23203/19/cli_classic.c File cli_classic.c:
https://review.coreboot.org/#/c/23203/19/cli_classic.c@619 PS19, Line 619: fill_flash->chip->total_size * 1024
*nod* […]
I would go for flash_size(), keep things simple:
static inline size_t flash_size(const struct flashctx *);
https://review.coreboot.org/#/c/23203/19/fmap.c File fmap.c:
https://review.coreboot.org/#/c/23203/19/fmap.c@62 PS19, Line 62: if (i == FMAP_STRLEN - 1) {
I suspect the intention here is to say that if we reach FMAP_STRLEN - 1 without quitting due to the […]
What I meant was that I'd have written a similar condition below the loop. A common pattern, FWIW, for-loop + check if it run all the way through.
But you are right, just leave it as is.