Attention is currently required from: Anastasia Klimchuk.
Stanislav Ponomarev has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/79112?usp=email )
Change subject: serial: Fix sp_flush_incoming for serprog TCP connections ......................................................................
Patch Set 4:
(10 comments)
Commit Message:
https://review.coreboot.org/c/flashrom/+/79112/comment/153babef_74cfa5ff : PS2, Line 9: I was working on an
During the development of
Done
https://review.coreboot.org/c/flashrom/+/79112/comment/3afdb5d1_727a4c53 : PS2, Line 9: pet
maybe remove "pet" :)
Done
https://review.coreboot.org/c/flashrom/+/79112/comment/09b8ad96_e0551d0a : PS2, Line 10: when i implemented
implementation of
Done
https://review.coreboot.org/c/flashrom/+/79112/comment/59db9e38_34f88060 : PS2, Line 11: i
uppercase
Done
https://review.coreboot.org/c/flashrom/+/79112/comment/a34947ea_e9af1c5b : PS2, Line 14: I added
This patch adds
Done
https://review.coreboot.org/c/flashrom/+/79112/comment/e195c582_de881ae5 : PS2, Line 18: After that
TESTED=
Done
Patchset:
PS2:
Thank you for you patch! I added some comments. […]
Thank you for your detailed review!
Not sure what happened with the email - most likely i should have set all the names in Gerrit before sending the patch
File serial.c:
https://review.coreboot.org/c/flashrom/+/79112/comment/f9527939_5863938b : PS2, Line 380: int ret = tcflush(sp_fd, TCIFLUSH); : if (ret == 0) : return;
We typically use more compact variation. […]
Done
https://review.coreboot.org/c/flashrom/+/79112/comment/bc2ee925_41203f48 : PS2, Line 392: ret > 0
A question about return codes: `serialport_read_nonblock` can return positive or negative error code […]
Done
https://review.coreboot.org/c/flashrom/+/79112/comment/615df0f6_09424ad9 : PS2, Line 401: return;
I am thinking, maybe change slightly with less returns. […]
yeah, i'm a bit uncomfortable with this too, but i actually have no idea what to do if something else occurs especially since there is no return value to indicate that
i considered leaving the original FIXME: error handling comment here too
the only thing i'm pretty sure about - any error other than ENOTTY means sp_fd is in unrecoverable state and any following read/write operation will fail too
i have made the changes you suggested and added some new comments