Skip to content
This repository was archived by the owner on Jun 13, 2023. It is now read-only.

Commit 2aa94e3

Browse files
committed
Implement lseek()
1 parent da5a750 commit 2aa94e3

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

hardware/zpuino/zpu20/libraries/SmallFS/SmallFS.cpp

+8-1
Original file line numberDiff line numberDiff line change
@@ -391,12 +391,19 @@ static ssize_t zf_smallfs_read(void *ptr, void *dest, size_t size)
391391
return f->read(dest, size);
392392
}
393393

394+
static ssize_t zf_smallfs_seek(void *ptr, int pos, int whence)
395+
{
396+
SmallFSFile *f = static_cast<SmallFSFile*>(ptr);
397+
return f->seek(pos, whence);
398+
}
399+
394400
static struct zfops zf_smallfs_ops = {
395401
&zf_smallfs_open,
396402
NULL,
397403
&zf_smallfs_read,
398404
NULL,
399-
NULL,
405+
&zf_smallfs_seek,
406+
NULL
400407
};
401408

402409
void zf_register_smallfs()

0 commit comments

Comments
 (0)