lib: os: fdtable: add support for fsync

Add support for fsync in existing posix ioctl call

Signed-off-by: Karthikeyan Krishnasamy <karthikeyan@linumiz.com>
This commit is contained in:
Karthikeyan Krishnasamy 2024-04-13 13:12:12 +05:30 committed by Chris Friedt
commit 65ad32b3ca
3 changed files with 6 additions and 0 deletions

View file

@ -144,6 +144,10 @@ static int fs_ioctl_vmeth(void *obj, unsigned int request, va_list args)
struct posix_fs_desc *ptr = obj;
switch (request) {
case ZFD_IOCTL_FSYNC: {
rc = fs_sync(&ptr->file);
break;
}
case ZFD_IOCTL_LSEEK: {
off_t offset;
int whence;