summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/dev.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/lib/dev.c b/src/lib/dev.c
index 8647bea9..80d7e9ad 100644
--- a/src/lib/dev.c
+++ b/src/lib/dev.c
@@ -1007,6 +1007,7 @@ ssize_t flow_write(int fd,
if ((flags & FLOWFACCMODE) == FLOWFRDONLY)
return -EPERM;
+ /* TODO: partial writes. */
if (flags & FLOWFWNOBLOCK)
idx = shm_rdrbuff_alloc(ai.rdrb,
count,
@@ -1056,9 +1057,7 @@ ssize_t flow_write(int fd,
pthread_rwlock_unlock(&ai.lock);
- assert(ret <= 0);
-
- return ret;
+ return ret < 0 ? (ssize_t) ret : (ssize_t) count;
}
ssize_t flow_read(int fd,