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>
This commit is contained in:
Harsh Prateek Bora 2011-02-02 10:20:33 +05:30 committed by Venkateswararao Jujjuri
parent 1d810aeb4e
commit f35bde2f8f

View File

@ -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);