[SeaBIOS] [PATCH] readserial: allow reading of zero bytes
Vadim Bendebury
vbendeb at chromium.org
Tue Dec 19 02:44:56 CET 2017
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 at 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
--
2.15.1.504.g5279b80103-goog
More information about the SeaBIOS
mailing list