LibC: Fix {read,write}v return value for partial actions

This commit is contained in:
Bananymous 2026-02-08 18:45:29 +02:00
parent 8794122c2d
commit 9809f87010
1 changed files with 4 additions and 2 deletions

View File

@ -20,9 +20,10 @@ ssize_t readv(int fildes, const struct iovec* iov, int iovcnt)
if (ret <= 0) if (ret <= 0)
return result; return result;
nread += ret; nread += ret;
result += ret;
} }
result += nread;
} }
return result; return result;
} }
@ -44,8 +45,9 @@ ssize_t writev(int fildes, const struct iovec* iov, int iovcnt)
if (ret <= 0) if (ret <= 0)
return result; return result;
nwrite += ret; nwrite += ret;
result += ret;
} }
result += nwrite;
} }
return result; return result;
} }