diff options
author | Bruce Rogers | 2017-06-29 15:11:50 +0200 |
---|---|---|
committer | Greg Kurz | 2017-06-29 15:11:50 +0200 |
commit | 790db7efdbe1536acf1c4f4f95a0316dbda59433 (patch) | |
tree | 13509d6bebb6f78994456db0a6c722810e8a3c8a | |
parent | Merge remote-tracking branch 'remotes/sstabellini/tags/xen-20170627-tag' into... (diff) | |
download | qemu-790db7efdbe1536acf1c4f4f95a0316dbda59433.tar.gz qemu-790db7efdbe1536acf1c4f4f95a0316dbda59433.tar.xz qemu-790db7efdbe1536acf1c4f4f95a0316dbda59433.zip |
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>
-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; } |