mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-30 02:20:48 +00:00
If flash_ec was run without `servod` running and servod is needed, an error message is printed out. ERROR: Cannot communicate with servo. is servod running ? However, in the case of flashing an stm32 without servod running, execution would continue and would lead to claim_pty freezing and thawing a bunch of unrelated processes. I believe the reason is that the "die" was run in a subshell and therefore execution continued. This commit now changes the way that servo_ec_uart_pty() works. If no PTY is found, then flash_ec exits printing out the error message. Additonally, claim_pty() will now warn if no arguments are passed to it instead of finding random victims. BUG=chromium:751386 BRANCH=maybe some fw branches. TEST=Without servod running, try `./util/flash_ec --board hammer`; Verify that flash_ec exists after the call to die. Change-Id: I50784e0c43bbf0e32d408261cb83029377b576a0 Signed-off-by: Aseda Aboagye <aaboagye@google.com> Reviewed-on: https://chromium-review.googlesource.com/598506 Commit-Ready: Aseda Aboagye <aaboagye@chromium.org> Tested-by: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>