Merge "Check an edge case when read(2) returns 0" am: 3202b8faf4 am: 852ae8d0fb am: 0ae9d80082
am: 28f6c43db5
Change-Id: I8fb1470e0f7e675c205bffe95c4fb9d0f202e4ed
This commit is contained in:
@@ -336,6 +336,9 @@ int WriteToPartition(const unsigned char* data, size_t len, const char* target)
|
||||
printf("verify read error %s at %zu: %s\n",
|
||||
partition, p, strerror(errno));
|
||||
return -1;
|
||||
} else if (read_count == 0) {
|
||||
printf("verify read reached unexpected EOF, %s at %zu\n", partition, p);
|
||||
return -1;
|
||||
}
|
||||
if (static_cast<size_t>(read_count) < to_read) {
|
||||
printf("short verify read %s at %zu: %zd %zu %s\n",
|
||||
|
||||
Reference in New Issue
Block a user