David Hendricks 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 25:
(4 comments)
https://review.coreboot.org/#/c/23203/22/flashrom.8.tmpl File flashrom.8.tmpl:
https://review.coreboot.org/#/c/23203/22/flashrom.8.tmpl@52 PS22, Line 52: .SH DESCRIPTION
Hmmm, new gerrit UI refused to save after editing above comment... […]
Thanks for clarifying, done. As you say it prints as follows now: flashrom [-h|-R|-L|-z|-p <programmername>[:<parameters>] [-E|-r <file>|-w <file>|-v <file>] [-c <chipname>] [(-l <file>|--ifd| --fmap|--fmap-file <file>) [-i <image>]] [-n] [-N] [-f]] [-V[V[V]]] [-o <logfile>]
https://review.coreboot.org/#/c/23203/22/fmap.c File fmap.c:
https://review.coreboot.org/#/c/23203/22/fmap.c@203 PS22, Line 203: }
Now the malloc error path is missing the finalize_flash_access()...
d'oh... fixed.
https://review.coreboot.org/#/c/23203/24/fmap.c File fmap.c:
https://review.coreboot.org/#/c/23203/24/fmap.c@281 PS24, Line 281: * should be a valid, usable fmap. */
Should we set `ret = 2` here too?
Yes, that makes sense.
https://review.coreboot.org/#/c/23203/24/fmap.c@285 PS24, Line 285: : *fmap_out = fmap; : ret = 0; : _free_ret: : if (ret) : free(fmap); : finalize_flash_access(flashctx);
Now that the code is more straight forward to read. We don't need […]
Yep, done.