]> xenbits.xensource.com Git - qemu-xen-4.5-testing.git/commitdiff
hw/virtio-9p-local.c: Remove unnecessary null char in symlink file
authorHarsh Prateek Bora <harsh@linux.vnet.ibm.com>
Wed, 2 Feb 2011 04:50:33 +0000 (10:20 +0530)
committerVenkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
Wed, 27 Apr 2011 15:27:01 +0000 (08:27 -0700)
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>
hw/9pfs/virtio-9p-local.c

index a8e7525bf60e37847a719544da75f08ff7d8ddd6..0a015de9a53bfffddd2b209318f827c8e50fc4ec 100644 (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);