aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorHarsh Prateek Bora <harsh@linux.vnet.ibm.com>2011-02-02 10:20:33 +0530
committerVenkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>2011-04-27 08:27:01 -0700
commitf35bde2f8fb55541d4d7ddca50d64ce5a6ef384c (patch)
tree4b8eba40f175c08709ec8e8058cc70f45c1441f4 /hw
parent1d810aeb4eda548e8a875db9e364732b8765d894 (diff)
downloadqemu-f35bde2f8fb55541d4d7ddca50d64ce5a6ef384c.zip
qemu-f35bde2f8fb55541d4d7ddca50d64ce5a6ef384c.tar.gz
qemu-f35bde2f8fb55541d4d7ddca50d64ce5a6ef384c.tar.bz2
hw/virtio-9p-local.c: Remove unnecessary null char in symlink file
This patch removes the addition of null char in symlink file which is being appended to file in case of mapped security model. Without this patch, the extra null char causes LTP testcase lstat03 to fail and hence this fix is required. Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/9pfs/virtio-9p-local.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/9pfs/virtio-9p-local.c b/hw/9pfs/virtio-9p-local.c
index a8e7525..0a015de 100644
--- a/hw/9pfs/virtio-9p-local.c
+++ b/hw/9pfs/virtio-9p-local.c
@@ -370,7 +370,7 @@ static int local_symlink(FsContext *fs_ctx, const char *oldpath,
return fd;
}
/* Write the oldpath (target) to the file. */
- oldpath_size = strlen(oldpath) + 1;
+ oldpath_size = strlen(oldpath);
do {
write_size = write(fd, (void *)oldpath, oldpath_size);
} while (write_size == -1 && errno == EINTR);