Don't fail the last firehose read when the number of bytes read is 0

On Windows, the last firehose read may return 0. Don't fail a firehose read in that situation.

Signed-off-by: Julien Vanier <jvanier@gmail.com>
This commit is contained in:
Julien Vanier
2025-05-02 08:22:54 -04:00
parent 136f8e2158
commit f73656237d

View File

@@ -150,7 +150,7 @@ static int firehose_read(struct qdl_device *qdl, int timeout_ms,
do {
n = qdl_read(qdl, buf, sizeof(buf), 100);
if (n < 0) {
if (n <= 0) {
gettimeofday(&now, NULL);
if (timercmp(&now, &timeout, <))
continue;