/* this function will seek the offset for specified file descriptor. */
int dfs_file_lseek(struct dfs_fd *fd, off_t offset)
/* this function will seek the offset for specified file descriptor. */
int dfs_file_lseek(struct dfs_fd *fd, off_t offset)
{
    int result;
    if (fd == NULL)
        return -EINVAL;
    if (fd->fops->lseek == NULL)
        return -ENOSYS;
    result = fd->fops->lseek(fd, offset);
    if (result >= 0)
        fd->pos = result;
    return result;
}