/* this function will write some specified length data to file system. */
int dfs_file_write(struct dfs_fd *fd, const void *buf, size_t len)
/* this function will write some specified length data to file system. */
int dfs_file_write(struct dfs_fd *fd, const void *buf, size_t len)
{
    if (fd == NULL)
        return -EINVAL;
    if (fd->fops->write == NULL)
        return -ENOSYS;
    return fd->fops->write(fd, buf, len);
}