~aleteoryx/muditaos

dc16684eabe8b1de63764706cffdde4238da3d3f — Lucjan Bryndza 5 years ago fc81412
[EGD-4221] lseek syscall fix (#1028)

lseek return incorrect return value. This patch fix it

Co-authored-by: Lucjan Bryndza <lucjan.bryndza@mudita.com>
1 files changed, 9 insertions(+), 1 deletions(-)

M module-vfs/src/newlib/vfs_io_syscalls.cpp
M module-vfs/src/newlib/vfs_io_syscalls.cpp => module-vfs/src/newlib/vfs_io_syscalls.cpp +9 -1
@@ 140,7 140,15 @@ namespace vfsn::internal::syscalls
            return -1;
        }
        auto ret = ff_fseek(fil, pos, dir);
        _errno_  = stdioGET_ERRNO();
        if (ret) {
            _errno_ = stdioGET_ERRNO();
            return static_cast<off_t>(-1);
        }
        ret = ff_ftell(fil);
        if (ret < 0) {
            _errno_ = stdioGET_ERRNO();
            return static_cast<off_t>(-1);
        }
        return ret;
    }
    int fstat(int &_errno_, int fd, struct stat *pstat)