MCPcopy Index your code
hub / github.com/F-Stack/f-stack / ff_write

Function ff_write

lib/ff_syscall_wrapper.c:1124–1150  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1122}
1123
1124ssize_t
1125ff_write(int fd, const void *buf, size_t nbytes)
1126{
1127 struct uio auio;
1128 struct iovec aiov;
1129 int rc;
1130
1131 if (nbytes > INT_MAX) {
1132 rc = EINVAL;
1133 goto kern_fail;
1134 }
1135
1136 aiov.iov_base = (void *)(uintptr_t)buf;
1137 aiov.iov_len = nbytes;
1138 auio.uio_iov = &aiov;
1139 auio.uio_iovcnt = 1;
1140 auio.uio_resid = nbytes;
1141 auio.uio_segflg = UIO_SYSSPACE;
1142 if ((rc = kern_writev(curthread, fd, &auio)))
1143 goto kern_fail;
1144 rc = curthread->td_retval[0];
1145
1146 return (rc);
1147kern_fail:
1148 ff_os_errno(rc);
1149 return (-1);
1150}
1151
1152ssize_t
1153ff_writev(int fd, const struct iovec *iov, int iovcnt)

Callers 7

loopFunction · 0.85
loopFunction · 0.85
loopFunction · 0.85
writeFunction · 0.85
writeFunction · 0.85
ff_sys_writeFunction · 0.85
ff_hook_writeFunction · 0.85

Calls 2

kern_writevFunction · 0.85
ff_os_errnoFunction · 0.85

Tested by

no test coverage detected