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
28
29
|
/*
* static int
* wrap___fxstatat(int ver, int dirfd, const char *path, struct stat *buf, int flags) {
* int rc = -1;
*/
struct stat64 buf64;
/* populate buffer with complete data */
#ifdef PSEUDO_NO_REAL_AT_FUNCTIONS
if (dirfd != AT_FDCWD) {
errno = ENOSYS;
return -1;
}
if (flags & AT_SYMLINK_NOFOLLOW) {
rc = real___lxstat(ver, path, buf);
} else {
rc = real___xstat(ver, path, buf);
}
#else
real___fxstatat(ver, dirfd, path, buf, flags);
#endif
/* obtain fake data */
rc = wrap___fxstatat64(ver, dirfd, path, &buf64, flags);
/* overwrite */
pseudo_stat32_from64(buf, &buf64);
/* return rc;
* }
*/
|