From f35bde2f8fb55541d4d7ddca50d64ce5a6ef384c Mon Sep 17 00:00:00 2001 From: Harsh Prateek Bora Date: Wed, 2 Feb 2011 10:20:33 +0530 Subject: 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 --- hw/9pfs/virtio-9p-local.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hw/9pfs/virtio-9p-local.c') diff --git a/hw/9pfs/virtio-9p-local.c b/hw/9pfs/virtio-9p-local.c index a8e7525bf6..0a015de9a5 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); -- cgit v1.2.1