Attention is currently required from: Edward O'Callaghan, Daniel Campello, Anastasia Klimchuk. Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/59291 )
Change subject: flashrom: Convert do_read() into a libflashrom user ......................................................................
Patch Set 4:
(3 comments)
File cli_classic.c:
https://review.coreboot.org/c/flashrom/+/59291/comment/51f2db08_7b1be3f8 PS4, Line 635: if (map_flash(&flashes[0]) != 0) { : free(flashes[0].chip); : ret = 1; : goto out_shutdown; : } : msg_cinfo("Please note that forced reads most likely contain garbage.\n"); : ret = do_read(&flashes[0], filename); : unmap_flash(&flashes[0]); Mapping/unmapping is redundant with the calls in prepare_/finalize_flash_access(). Results are probably undefined.
I guess this might have been done on purpose to avoid the checks in prepare_flash_access().
File flashrom.c:
https://review.coreboot.org/c/flashrom/+/59291/comment/8e65c595_64fc1380 PS4, Line 1935: } Looks redundant given the checks in prepare_flash_access()?
https://review.coreboot.org/c/flashrom/+/59291/comment/76b6ea56_d4961c90 PS4, Line 2169: 1024 KiB?