mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-02 17:28:30 +00:00
Improve system call support on NT
- Improve i/o perf on New Technology - Code cleanup on read() for New Technology - Fix bad bug with dup() of socket on New Technology - Clean up some more strace errors on New Technology
This commit is contained in:
parent
29bf8b1a30
commit
4f98ad1054
79 changed files with 707 additions and 197 deletions
|
@ -49,6 +49,7 @@
|
|||
* @asyncsignalsafe
|
||||
*/
|
||||
ssize_t readlinkat(int dirfd, const char *path, char *buf, size_t bufsiz) {
|
||||
char sb[12];
|
||||
ssize_t bytes;
|
||||
if ((IsAsan() && !__asan_is_valid(buf, bufsiz)) || (bufsiz && !buf)) {
|
||||
bytes = efault();
|
||||
|
@ -60,7 +61,7 @@ ssize_t readlinkat(int dirfd, const char *path, char *buf, size_t bufsiz) {
|
|||
} else {
|
||||
bytes = sys_readlinkat_nt(dirfd, path, buf, bufsiz);
|
||||
}
|
||||
STRACE("readlinkat(%d, %#s, [%#.*s]) → %d% m", dirfd, path, MAX(0, bytes),
|
||||
buf, bytes);
|
||||
STRACE("readlinkat(%s, %#s, [%#.*s]) → %d% m", __strace_dirfd(sb, dirfd),
|
||||
path, MAX(0, bytes), buf, bytes);
|
||||
return bytes;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue