Certain serial device drivers might return without reading anything, returning empty buffer. This is not an indication of the interface being shut down, the readserial utility should keep running.
Signed-off-by: Vadim Bendebury vbendeb@chromium.org --- scripts/readserial.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/readserial.py b/scripts/readserial.py index a7383e8..ffb076f 100755 --- a/scripts/readserial.py +++ b/scripts/readserial.py @@ -71,7 +71,7 @@ def readserial(infile, logfile, byteadjust): continue d = infile.read(4096) if not d: - return 0 + continue datatime = time.time()
datatime -= len(d) * byteadjust