Attention is currently required from: Edward O'Callaghan, Angel Pons, Alexander Goncharov.
Hello build bot (Jenkins), Edward O'Callaghan, Angel Pons, Anastasia Klimchuk,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/flashrom/+/73039
to look at the new patch set (#7).
Change subject: flashrom: rewrite flashbuses_to_text() ......................................................................
flashrom: rewrite flashbuses_to_text()
The previous implementation had no error handling, as a result the flashrom could crash if the computer ran out of memory. The new version returns NULL in such cases.
Also, rewrite lots of `if` conditions to one cycle, store a name of buses and `enum chipbustype` in an array by using a custom struct.
The caller always expected a non-null value, so change its behavior to handle a possible null value or use the `?` symbol. As far as `free()` can handle null pointers, do nothing with such callers.
TEST=ninja test
Change-Id: I59b9044c99b4ba6c00d8c97f1e91af09d70dce2c Signed-off-by: Alexander Goncharov chat@joursoir.net Ticket: https://ticket.coreboot.org/issues/408 --- M cli_classic.c M flashrom.c M print.c M print_wiki.c 4 files changed, 78 insertions(+), 23 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/39/73039/7