virtio-9p: Add P9_TWRITE support

Implement P9_TWRITE support.
This gets write to file to work

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
Anthony Liguori 2010-04-29 17:44:58 +05:30
parent bbd5697b8e
commit 8449360cbd
3 changed files with 118 additions and 2 deletions

View file

@ -127,6 +127,12 @@ static off_t local_lseek(FsContext *ctx, int fd, off_t offset, int whence)
return lseek(fd, offset, whence);
}
static ssize_t local_writev(FsContext *ctx, int fd, const struct iovec *iov,
int iovcnt)
{
return writev(fd, iov, iovcnt);
}
FileOperations local_ops = {
.lstat = local_lstat,
.setuid = local_setuid,
@ -141,4 +147,5 @@ FileOperations local_ops = {
.seekdir = local_seekdir,
.readv = local_readv,
.lseek = local_lseek,
.writev = local_writev,
};