Attention is currently required from: Daniel Campello, Edward O'Callaghan, Nico Huber, Peter Marheine, Richard Hughes.
Anastasia Klimchuk has posted comments on this change by Richard Hughes. ( https://review.coreboot.org/c/flashrom/+/64663?usp=email )
Change subject: libflashrom: Allow getting the progress_state from the flashctx ......................................................................
Patch Set 6:
(1 comment)
File tests/chip.c:
https://review.coreboot.org/c/flashrom/+/64663/comment/e5b42e6a_606b99ea?usp... : PS6, Line 86: struct progress_user_data *progress_user_data = progress_state->user_data;
I don't think we can change the API without either doing a whole ABI break (increment the soname or […]
Thanks heaps for all details! Very useful.
I thought of one more reason, apart of the question of mutability. In the current code, we provide a parameter into progress callback, but then this value is not actually usable by external clients without one more API call? We know that callback needs progress state and user data, we can (should) give that as parameters straight away.
I guess this detail was missed when progress callback was introduced initially (at least I missed this), because our code, specifically tests and cli, can look into flash context. First paragraph of commit message explains the situation well.
So yes, I am going to try with progress callback v1 (this signature `void(flashrom_progress_callback)(enum flashrom_progress stage, size_t, size_t, void*)`) and then `flashrom_get_progress_state` won't be needed anymore.