From f42cd9ccfefd6ca16b3365728adf44261e16d775 Mon Sep 17 00:00:00 2001 From: Pekka Enberg Date: Tue, 12 Jul 2011 21:42:21 +0300 Subject: [PATCH] kvm tools: Use writev() in xwritev() 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 Signed-off-by: Pekka Enberg --- read-write.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/read-write.c b/read-write.c index 7e233b5..737fb26 100644 --- a/read-write.c +++ b/read-write.c @@ -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;