mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-12-23 01:29:33 +00:00
Avoid reading bytes from the original file when their is a log entry for that part of the file.
This commit is contained in:
parent
63bfaa22ae
commit
5330dd1565
@ -1135,8 +1135,8 @@ cfs_read(int fd, void *buf, unsigned size)
|
|||||||
|
|
||||||
/* Read from the original file if we cannot find the data in the log. */
|
/* Read from the original file if we cannot find the data in the log. */
|
||||||
if(r < 0) {
|
if(r < 0) {
|
||||||
COFFEE_READ(buf, bytes_left, absolute_offset(file->page, fdp->offset));
|
COFFEE_READ(buf, lp.size, absolute_offset(file->page, fdp->offset));
|
||||||
r = bytes_left;
|
r = lp.size;
|
||||||
}
|
}
|
||||||
fdp->offset += r;
|
fdp->offset += r;
|
||||||
buf = (char *)buf + r;
|
buf = (char *)buf + r;
|
||||||
|
Loading…
Reference in New Issue
Block a user