goto docopy;
resize:
+ if (source->fd < 0)
+ /* we have to wait for some data to come to us */
+ return -EWOULDBLOCK;
+
if (source->size - source->filled < LINE_CHUNK) {
// XXX: add check for maximum line length
assert(data);
while(source->filled < size) {
+ if (source->fd < 0)
+ /* we have to wait for some data to come to us */
+ return -EWOULDBLOCK;
+
if (!GREEDY_REALLOC(source->buf, source->size, size))
return log_oom();