Attention is currently required from: Dmitry Zhadinets, Peter Marheine.
Anastasia Klimchuk has posted comments on this change by Anastasia Klimchuk. ( https://review.coreboot.org/c/flashrom/+/87341?usp=email )
Change subject: libflashrom: Add probing v2 which can find all mathching chips ......................................................................
Patch Set 3:
(3 comments)
File cli_classic.c:
https://review.coreboot.org/c/flashrom/+/87341/comment/9a1a1cc4_18e6efac?usp... : PS1, Line 1050: struct flashctx flashes[8] = {{0}};
This array won't be needed after this patch, in the next commit it can be replaced with just one fla […]
To elaborate what I was thinking about: I wanted to have some first reviews so that we decide that we go ahead with this. And then I will create separate commit to refactor the array and replace the array with one working context (because realistically only one context is used).
https://review.coreboot.org/c/flashrom/+/87341/comment/d0682f7d_cc7e28ad?usp... : PS1, Line 1215: flashrom_flash_probe_v2
Check the return value
Done
File cli_classic.c:
https://review.coreboot.org/c/flashrom/+/87341/comment/3fa99173_f50cdc17?usp... : PS3, Line 1216: if (ret == 1) { A comment here is that: probing never returns 1, and v1 probing never returned 1 either. The root cause is that probe_flash returns -1 for both the case when no match found and when any error happens during probing :(
I added this ret code handling because I think that it's reasonable for libflashrom client to check ret code. The situation that libflashrom never returns 1 despite of API documentation is more of internal issue, maybe we will fix it later. Meanwhile clients can check ret code according to documentation.
I am also interested what do people think about it.