aboutsummaryrefslogtreecommitdiff
path: root/hw/virtio-9p-local.c
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2010-04-29 17:44:56 +0530
committerAnthony Liguori <aliguori@us.ibm.com>2010-05-03 12:17:39 -0500
commita92315553df516a5e3431142aadab93482c6b29f (patch)
tree7afc08c5eef9afe1bde982bb7b12a11fa6efec36 /hw/virtio-9p-local.c
parenta6568fe27fdb50a46109b48612128cf712e60130 (diff)
virtio-9p: Add P9_TREAD support
Implement P9_TREAD support. 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>
Diffstat (limited to 'hw/virtio-9p-local.c')
-rw-r--r--hw/virtio-9p-local.c37
1 files changed, 37 insertions, 0 deletions
diff --git a/hw/virtio-9p-local.c b/hw/virtio-9p-local.c
index 3788d4e03d..81d1971040 100644
--- a/hw/virtio-9p-local.c
+++ b/hw/virtio-9p-local.c
@@ -96,6 +96,37 @@ static DIR *local_opendir(FsContext *ctx, const char *path)
return opendir(rpath(ctx, path));
}
+static void local_rewinddir(FsContext *ctx, DIR *dir)
+{
+ return rewinddir(dir);
+}
+
+static off_t local_telldir(FsContext *ctx, DIR *dir)
+{
+ return telldir(dir);
+}
+
+static struct dirent *local_readdir(FsContext *ctx, DIR *dir)
+{
+ return readdir(dir);
+}
+
+static void local_seekdir(FsContext *ctx, DIR *dir, off_t off)
+{
+ return seekdir(dir, off);
+}
+
+static ssize_t local_readv(FsContext *ctx, int fd, const struct iovec *iov,
+ int iovcnt)
+{
+ return readv(fd, iov, iovcnt);
+}
+
+static off_t local_lseek(FsContext *ctx, int fd, off_t offset, int whence)
+{
+ return lseek(fd, offset, whence);
+}
+
FileOperations local_ops = {
.lstat = local_lstat,
.setuid = local_setuid,
@@ -104,4 +135,10 @@ FileOperations local_ops = {
.closedir = local_closedir,
.open = local_open,
.opendir = local_opendir,
+ .rewinddir = local_rewinddir,
+ .telldir = local_telldir,
+ .readdir = local_readdir,
+ .seekdir = local_seekdir,
+ .readv = local_readv,
+ .lseek = local_lseek,
};