[PATCH 1/3] libcsupport: Add and use rtems_libio_iovec_eval()
Sebastian Huber
sebastian.huber at embedded-brains.de
Tue Dec 17 08:05:16 UTC 2013
On 2013-12-17 08:58, Chris Johns wrote:
> On 17/12/2013 6:50 pm, Sebastian Huber wrote:
>>
>> Ok, I will change this into "if ( total > 0 ) {" since I don't need the
>> total == 0 case currently.
>
> I think we should pass the == 0 case through if not a regular file.
I would rather make sure that all read/write handlers can cope with the 0 case.
The problem is now that a write(fd, NULL, 0) makes sense, so the NULL pointer
check is in the way too. From my point of view these NULL pointer checks are
pretty useless here.
I don't have time at the moment to deal with this issue. My main problem is
the lack of writev and readv handlers.
>
>>
>> Is the rest ok?
>>
>
> In rtems_libio_iovec_eval should len be int or ssize ?
Oh, it should be size_t.
>
>> + for ( v = 0 ; v < iovcnt ; v++ ) {
>> + int len = iov[ v ].iov_len;
> ^ ?
>
> Chris
--
Sebastian Huber, embedded brains GmbH
Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone : +49 89 189 47 41-16
Fax : +49 89 189 47 41-09
E-Mail : sebastian.huber at embedded-brains.de
PGP : Public key available on request.
Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
More information about the devel
mailing list