diff options
author | Bruce Rogers <brogers@suse.com> | 2017-06-29 15:11:50 +0200 |
---|---|---|
committer | Greg Kurz <groug@kaod.org> | 2017-06-29 15:11:50 +0200 |
commit | 790db7efdbe1536acf1c4f4f95a0316dbda59433 (patch) | |
tree | 13509d6bebb6f78994456db0a6c722810e8a3c8a /hw/9pfs | |
parent | 464588675455afda2899e20a0b120e4075de50c7 (diff) |
9pfs: local: remove: use correct path component
Commit a0e640a8 introduced a path processing error.
Pass fstatat the dirpath based path component instead
of the entire path.
Signed-off-by: Bruce Rogers <brogers@suse.com>
Signed-off-by: Greg Kurz <groug@kaod.org>
Diffstat (limited to 'hw/9pfs')
-rw-r--r-- | hw/9pfs/9p-local.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/9pfs/9p-local.c b/hw/9pfs/9p-local.c index 1e78b7c9e9..83952eff0a 100644 --- a/hw/9pfs/9p-local.c +++ b/hw/9pfs/9p-local.c @@ -1100,7 +1100,7 @@ static int local_remove(FsContext *ctx, const char *path) goto out; } - if (fstatat(dirfd, path, &stbuf, AT_SYMLINK_NOFOLLOW) < 0) { + if (fstatat(dirfd, name, &stbuf, AT_SYMLINK_NOFOLLOW) < 0) { goto err_out; } |