summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDimitri Staessens <dimitri@ouroboros.rocks>2020-03-14 17:52:06 +0100
committerSander Vrijders <sander@ouroboros.rocks>2020-03-15 14:30:58 +0100
commit51d8f69fb152ae5a47151c2f132fd4263ec3d144 (patch)
tree67ef7b137bc00fdbb93774aa8ccbbbb39975ace0 /include
parentb977090a7692acada4b81677e88c5a5e60a153c3 (diff)
downloadouroboros-0.17.0.tar.gz
ouroboros-0.17.0.zip
lib: Return number of written bytes on flow_write0.17.0
This is more in line with the write() system call and prepares for partial writes. Partial writes are disabled by default (and not yet implemented). Signed-off-by: Dimitri Staessens <dimitri@ouroboros.rocks> Signed-off-by: Sander Vrijders <sander@ouroboros.rocks>
Diffstat (limited to 'include')
-rw-r--r--include/ouroboros/fccntl.h19
1 files changed, 10 insertions, 9 deletions
diff --git a/include/ouroboros/fccntl.h b/include/ouroboros/fccntl.h
index fac90134..965e281d 100644
--- a/include/ouroboros/fccntl.h
+++ b/include/ouroboros/fccntl.h
@@ -28,19 +28,20 @@
#include <sys/time.h>
/* Flow flags, same values as fcntl.h */
-#define FLOWFRDONLY 00000000 /* Read-only flow */
-#define FLOWFWRONLY 00000001 /* Write-only flow */
-#define FLOWFRDWR 00000002 /* Read-write flow */
-#define FLOWFACCMODE 00000003 /* Access mask */
+#define FLOWFRDONLY 00000000 /* Read-only flow */
+#define FLOWFWRONLY 00000001 /* Write-only flow */
+#define FLOWFRDWR 00000002 /* Read-write flow */
+#define FLOWFACCMODE 00000003 /* Access mask */
-#define FLOWFDOWN 00000004 /* Flow is down */
+#define FLOWFDOWN 00000004 /* Flow is down */
-#define FLOWFRNOBLOCK 00001000 /* Non-blocking read */
-#define FLOWFWNOBLOCK 00002000 /* Non-blocking write */
+#define FLOWFRNOBLOCK 00001000 /* Non-blocking read */
+#define FLOWFWNOBLOCK 00002000 /* Non-blocking write */
#define FLOWFNONBLOCK (FLOWFRNOBLOCK | FLOWFWNOBLOCK)
-#define FLOWFRNOPART 00004000 /* Disable partial reads */
+#define FLOWFRNOPART 00010000 /* Disable partial reads */
+#define FLOWFWNOPART 00020000 /* Disable partial writes */
-#define FLOWFDEFAULT FLOWFRDWR
+#define FLOWFDEFAULT (FLOWFRDWR | FLOWFWNOPART)
#define FLOWFINVALID (FLOWFWRONLY | FLOWFRDWR)