Attention is currently required from: Aarya, Anastasia Klimchuk, Nikolai Artemiev.
Sergii Dmytruk has posted comments on this change by Sergii Dmytruk. ( https://review.coreboot.org/c/flashrom/+/84102?usp=email )
Change subject: Complete and fix progress feature implementation for all operations ......................................................................
Patch Set 11:
(1 comment)
File cli_output.c:
https://review.coreboot.org/c/flashrom/+/84102/comment/fcb62a6e_f9160390?usp... : PS9, Line 164: progress_separator = (fmt[strlen(fmt) - 1] == '\n' ? NEWLINE : MIDLINE);
Oh yes, I haven't thought about it! There are probably many ways to fix that, I picked one way, let […]
I don't think it's worth calling `strlen()` twice like that in case of lots of logging lines. Also if the format is empty, the state shouldn't change at all. Maybe make a function like this to also reduce duplication: ```c static void update_line_state(const char *fmt) { size_t len = strlen(fmt); if (len != 0) line_state = (fmt[len - 1] == '\n' ? NEWLINE : MIDLINE); } ```