blob: 86832da248252a64a532e335b524cced2ff2c787 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
/*
* Copyright (c) 2010 Wind River Systems; see
* guts/COPYRIGHT for information.
*
* SPDX-License-Identifier: LGPL-2.1-only
*
* static ssize_t
* wrap_readlinkat(int dirfd, const char *path, char *buf, size_t bufsiz) {
* ssize_t rc = -1;
*/
#ifdef PSEUDO_NO_REAL_AT_FUNCTIONS
if (dirfd != AT_FDCWD) {
errno = ENOSYS;
return -1;
}
rc = real_readlink(path, buf, bufsiz);
#else
rc = real_readlinkat(dirfd, path, buf, bufsiz);
#endif
if (rc > 0) {
rc = pseudo_dechroot(buf, rc);
}
/* return rc;
* }
*/
|