mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 16:23:55 -06:00
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>
This commit is contained in:
parent
8cf89e007a
commit
5bae190082
3 changed files with 55 additions and 2 deletions
|
@ -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,
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue