fix read potentially returning corrupt data when the hardware fails

master
szaka 2008-11-30 17:16:37 +00:00
parent ce825e1a42
commit a1ca403e41
1 changed files with 2 additions and 1 deletions

View File

@ -914,8 +914,9 @@ retry:
total += br;
count -= br;
b = (u8*)b + br;
continue;
}
if (br == to_read)
continue;
/* If the syscall was interrupted, try again. */
if (br == (s64)-1 && errno == EINTR)
goto retry;