static oe_off_t _hostfs_lseek_dir(oe_fd_t* desc, oe_off_t offset, int whence)
{
    oe_off_t ret = -1;
    file_t* file = _cast_file(desc);

    if (!file || !file->dir || offset != 0 || whence != OE_SEEK_SET)
        OE_RAISE_ERRNO(OE_EINVAL);

    if ((ret = _hostfs_rewinddir(file->dir)) == -1)
        OE_RAISE_ERRNO(oe_errno);

done:
    return ret;
}
static oe_off_t _hostfs_lseek_dir(oe_fd_t* desc, oe_off_t offset, int whence)
{
    oe_off_t ret = -1;
    file_t* file = _cast_file(desc);

    if (!file || !file->dir || offset != 0 || whence != OE_SEEK_SET)
        OE_RAISE_ERRNO(OE_EINVAL);

    if ((ret = _hostfs_rewinddir(file->dir)) == -1)
        OE_RAISE_ERRNO(oe_errno);

done:
    return ret;
}