|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v20210601 04/38] tools: add readv_exact to libxenctrl
On 01.06.21 18:10, Olaf Hering wrote: Read a batch of iovec's. In the common case of short reads, finish individual iov's with read_exact. Signed-off-by: Olaf Hering <olaf@xxxxxxxxx> --- tools/libs/ctrl/xc_private.c | 55 +++++++++++++++++++++++++++++++++++- tools/libs/ctrl/xc_private.h | 1 + 2 files changed, 55 insertions(+), 1 deletion(-) diff --git a/tools/libs/ctrl/xc_private.c b/tools/libs/ctrl/xc_private.c index d94f846686..ea420b9ba8 100644 --- a/tools/libs/ctrl/xc_private.c +++ b/tools/libs/ctrl/xc_private.c @@ -659,8 +659,23 @@ int write_exact(int fd, const void *data, size_t size)#if defined(__MINIOS__)/*- * MiniOS's libc doesn't know about writev(). Implement it as multiple write()s. Is EOF really an error? This will stop the loop, even if idx hasn't reached iovcnt. + } + idx++; + } + } +out: + return rc; +} + Juergen Attachment:
OpenPGP_0xB0DE9DD628BF132F.asc Attachment:
OpenPGP_signature
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |