]> git.karo-electronics.de Git - karo-tx-linux.git/commit
kvm tools: Simply write_in_full() check semantics
authorAsias He <asias.hejun@gmail.com>
Mon, 9 Jan 2012 09:19:26 +0000 (17:19 +0800)
committerPekka Enberg <penberg@kernel.org>
Mon, 9 Jan 2012 19:02:28 +0000 (21:02 +0200)
commit1cf7f482b481942fb533d83a56057a2b564bb057
treed67d2813c433933c0e3cb3808d374a493c1d916c
parentf9a311a9501c011772e1773f27de32d3add23a45
kvm tools: Simply write_in_full() check semantics

write_in_full() would not return until count byes has been written or
error has occurred.

So

   if (write_in_full(fd, buf, count) < 0)
goto err;

is enough.

And

   if (write_in_full(fd, buf, count) != count)
goto err;

is not necessary.

Signed-off-by: Asias He <asias.hejun@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
tools/kvm/kvm-ipc.c