mirror of
https://github.com/oliverschmidt/contiki.git
synced 2025-01-03 11:30:53 +00:00
read as much as possible, even when reading log records.
This commit is contained in:
parent
1878fc18d5
commit
b591bb1b72
@ -913,10 +913,6 @@ cfs_read(int fd, void *buf, unsigned size)
|
|||||||
lp.size = remains;
|
lp.size = remains;
|
||||||
r = read_log_page(&hdr,
|
r = read_log_page(&hdr,
|
||||||
fdp->next_log_entry > 0 ? fdp->next_log_entry - 1 : -1, &lp);
|
fdp->next_log_entry > 0 ? fdp->next_log_entry - 1 : -1, &lp);
|
||||||
if(r >= 0) {
|
|
||||||
offset += r;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if(r < 0) {
|
if(r < 0) {
|
||||||
r = remains > COFFEE_PAGE_SIZE ? COFFEE_PAGE_SIZE : remains;
|
r = remains > COFFEE_PAGE_SIZE ? COFFEE_PAGE_SIZE : remains;
|
||||||
|
Loading…
Reference in New Issue
Block a user