diff options
author | Bruce Rogers <brogers@suse.com> | 2017-06-29 15:11:50 +0200 |
---|---|---|
committer | Michael Roth <mdroth@linux.vnet.ibm.com> | 2017-08-24 16:58:51 -0500 |
commit | e0398ccdf42e5a54c62ae617d374b5df9684ac0d (patch) | |
tree | 9f9608a0a2f29e91c663fb8f759bea1b43a6df4e | |
parent | 438cd1e6aacbb0755ab8ec8a03d34998c3ab0ea3 (diff) | |
download | qemu-e0398ccdf42e5a54c62ae617d374b5df9684ac0d.tar.gz |
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>
(cherry picked from commit 790db7efdbe1536acf1c4f4f95a0316dbda59433)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
-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 7a0c383e7e..b13ff2120e 100644 --- a/hw/9pfs/9p-local.c +++ b/hw/9pfs/9p-local.c @@ -1009,7 +1009,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; } |