summaryrefslogtreecommitdiffstats
path: root/hw/virtio-9p-local.c
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2010-04-29 17:45:01 +0530
committerAnthony Liguori <aliguori@us.ibm.com>2010-05-03 12:17:39 -0500
commit5bae190082fc24d8881e5db9409fc94f6c46f219 (patch)
treeb3b4d0bbd3939e2fc3753b1620d46abc1c9232d7 /hw/virtio-9p-local.c
parent8cf89e007a37fff75c06e5a4564d530e51c1ec98 (diff)
downloadhqemu-5bae190082fc24d8881e5db9409fc94f6c46f219.zip
hqemu-5bae190082fc24d8881e5db9409fc94f6c46f219.tar.gz
virtio-9p: Add P9_TREMOVE support.
Implement P9_TREMOVE support. This gets file deletion to work. [mohan@in.ibm.com: Fix truncate to use the relative path] 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.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/hw/virtio-9p-local.c b/hw/virtio-9p-local.c
index 5a011f3..1afb731 100644
--- a/hw/virtio-9p-local.c
+++ b/hw/virtio-9p-local.c
@@ -252,6 +252,11 @@ static int local_utime(FsContext *ctx, const char *path,
return utime(rpath(ctx, path), buf);
}
+static int local_remove(FsContext *ctx, const char *path)
+{
+ return remove(rpath(ctx, path));
+}
+
static int local_fsync(FsContext *ctx, int fd)
{
return fsync(fd);
@@ -284,5 +289,6 @@ FileOperations local_ops = {
.rename = local_rename,
.chown = local_chown,
.utime = local_utime,
+ .remove = local_remove,
.fsync = local_fsync,
};
OpenPOWER on IntegriCloud