aboutsummaryrefslogtreecommitdiff
path: root/sys/src/read.c
diff options
context:
space:
mode:
authorNicholas Noll <nbnoll@eml.cc>2021-11-17 17:38:58 -0800
committerNicholas Noll <nbnoll@eml.cc>2021-11-17 17:38:58 -0800
commit7eb20457ff3d80cc81d54204ffd2c9edaf991905 (patch)
tree8207073b475156293155accf6cc7804ff1a0f3eb /sys/src/read.c
parent8d60b38fbe778de30c3a1751b35d8e366882cd01 (diff)
automated platform specific code parsing
Diffstat (limited to 'sys/src/read.c')
-rw-r--r--sys/src/read.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/src/read.c b/sys/src/read.c
index 3aa3e29..8d308ba 100644
--- a/sys/src/read.c
+++ b/sys/src/read.c
@@ -1,7 +1,8 @@
#include "internal.h"
-intptr
-sys·read(int fd, intptr len, void *buf)
+int
+sys·read(int fd, intptr len, void *buf, intptr *n)
{
- return syscall(·Read, fd, buf, len);
+ intptr ret = *n = syscall(·Read, fd, buf, len);
+ return error(ret);
}