mirror of
https://github.com/linux-msm/qdl.git
synced 2026-02-25 13:12:25 -08:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user