Nico Huber has posted comments on this change. ( https://review.coreboot.org/23678 )
Change subject: [RFC]Don't make layoutfile and --ifd mutually exclusive ......................................................................
Patch Set 1:
(3 comments)
Long story short, you'd have to find a way without changing the interface of flashrom_layout_read_from_ifd() or redesign the way layouts are handled in the library interface.
https://review.coreboot.org/#/c/23678/1/cli_classic.c File cli_classic.c:
https://review.coreboot.org/#/c/23678/1/cli_classic.c@a393 PS1, Line 393: I guess, I left it up here so we can bail out early without probing for the flash chip.
https://review.coreboot.org/#/c/23678/1/libflashrom.c File libflashrom.c:
https://review.coreboot.org/#/c/23678/1/libflashrom.c@316 PS1, Line 316: gets set ...
https://review.coreboot.org/#/c/23678/1/libflashrom.c@377 PS1, Line 377: num_entries++ Overflow check? I guess it's impossible without knowing that `*layout` points to the global layout. You could, ofc, assume that, remove the `layout` parameter and remove this function from the library interface because it could only be used in- ternally.