]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
kvm tools: Use writev() in xwritev()
authorPekka Enberg <penberg@kernel.org>
Tue, 12 Jul 2011 18:42:21 +0000 (21:42 +0300)
committerPekka Enberg <penberg@kernel.org>
Tue, 12 Jul 2011 18:42:21 +0000 (21:42 +0300)
This patch fixes a typo in xwritev(). Luckily the function is not used so the
problem is only latent. Spotted during code review.

Cc: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
tools/kvm/read-write.c

index 7e233b5a53512b9bea9c397ac042b39ca22c4106..737fb26ddfbe014b74af154a851300c75b448843 100644 (file)
@@ -173,7 +173,7 @@ ssize_t xwritev(int fd, const struct iovec *iov, int iovcnt)
        ssize_t nr;
 
 restart:
-       nr = write(fd, iov, iovcnt);
+       nr = writev(fd, iov, iovcnt);
        if ((nr < 0) && ((errno == EAGAIN) || (errno == EINTR)))
                goto restart;