readlinkat.c\unistd\src - musl - musl - an implementation of the standard library for Linux-based systems

index : musl
musl - an implementation of the standard library for Linux-based systems
summary refs log tree commit diff
path: root/src/unistd/readlinkat.c
blob: f79d3d14280ec46afc56dc715f684a1b0cd721e5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include <unistd.h>
#include "syscall.h"
ssize_t readlinkat(int fd, const char *restrict path, char *restrict buf, size_t bufsize)
{
	char dummy[1];
	if (!bufsize) {
		buf = dummy;
		bufsize = 1;
	}
	int r = __syscall(SYS_readlinkat, fd, path, buf, bufsize);
	if (buf == dummy && r > 0) r = 0;
	return __syscall_ret(r);
}
generated by cgit v1.2.1 (git 2.18.0) at 2025年09月07日 02:11:09 +0000

AltStyle によって変換されたページ (->オリジナル) /