Attention is currently required from: Anastasia Klimchuk, Peter Marheine.
Dmitry Zhadinets has posted comments on this change by Dmitry Zhadinets. ( https://review.coreboot.org/c/flashrom/+/86921?usp=email )
Change subject: libflashrom: Add API to enumerate supported programmers ......................................................................
Patch Set 11:
(4 comments)
Patchset:
PS1:
But this is a good idea: `list_programmers_linebreak` iterates through programmers names, which is e […]
One moment please, ```list_programmers_linebreak``` has a different meaning. It does not prepare the list for external usage, it prints the list to the logger only, assuming line breaks/startcol/cols/paren. But I need just an array of strings and this is a simple loop through. It is not heavy in order to reuse something.
Iterator has its meaning from this comment https://review.coreboot.org/c/flashrom/+/86921/comment/305f6656_3d9d7212/ The issue is that I had to allocate the memory and Peter wanted to prevent it but we already use an allocation in all other get_supported.. functions. Therefore we decided to leave this implementation plus to implement fn like this in next commit ``` const char *flashrom_get_programmer_name(int n) { if (n < 0 || (size_t)n >= programmer_table_size) return NULL; return programmer_table[n]->name; } ``` I probably confused you with the deleting of commits. It is my fault. My git for some reason squashes commit when I set to edit it. But lets discuss only what we have here please.
Commit Message:
https://review.coreboot.org/c/flashrom/+/86921/comment/8df972b1_2c57a8d8?usp... : PS10, Line 7: libflashrom: Added API to enumerate supported programmers
This title we changed earlier as […]
Done
File libflashrom.c:
https://review.coreboot.org/c/flashrom/+/86921/comment/86eadc86_712540a1?usp... : PS10, Line 199:
no space here
Done
File tests/libflashrom.c:
https://review.coreboot.org/c/flashrom/+/86921/comment/3f22ee95_fdf0c6a4?usp... : PS10, Line 109: while (*(ptr++)) {}
Maybe you can assert inside the loop that programmer name is not empty string (unless it's the last […]
Done