diff options
author | Anthony Liguori <aliguori@us.ibm.com> | 2010-04-29 17:44:55 +0530 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2010-05-03 12:17:39 -0500 |
commit | a6568fe27fdb50a46109b48612128cf712e60130 (patch) | |
tree | a74f1c7eb8d43a0bbbcdd4c94f879666b150b3c3 /hw/virtio-9p-local.c | |
parent | ff5e54c98749ca2e5586cb1cdbb2b97c69c7ee51 (diff) |
virtio-9p: Add P9_TOPEN support.
Implement P9_TOPEN 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.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/hw/virtio-9p-local.c b/hw/virtio-9p-local.c index 880cd0a98..3788d4e03 100644 --- a/hw/virtio-9p-local.c +++ b/hw/virtio-9p-local.c @@ -86,10 +86,22 @@ static int local_closedir(FsContext *ctx, DIR *dir) return closedir(dir); } +static int local_open(FsContext *ctx, const char *path, int flags) +{ + return open(rpath(ctx, path), flags); +} + +static DIR *local_opendir(FsContext *ctx, const char *path) +{ + return opendir(rpath(ctx, path)); +} + FileOperations local_ops = { .lstat = local_lstat, .setuid = local_setuid, .readlink = local_readlink, .close = local_close, .closedir = local_closedir, + .open = local_open, + .opendir = local_opendir, }; |