mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-12-22 10:30:13 +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. */
|
||||
if(r < 0) {
|
||||
COFFEE_READ(buf, bytes_left, absolute_offset(file->page, fdp->offset));
|
||||
r = bytes_left;
|
||||
COFFEE_READ(buf, lp.size, absolute_offset(file->page, fdp->offset));
|
||||
r = lp.size;
|
||||
}
|
||||
fdp->offset += r;
|
||||
buf = (char *)buf + r;
|
||||
|
Loading…
Reference in New Issue
Block a user