]>
Commit | Line | Data |
---|---|---|
688903eb | 1 | /* Copyright (C) 2011-2018 Free Software Foundation, Inc. |
a63c7fa1 CM |
2 | This file is part of the GNU C Library. |
3 | Contributed by Chris Metcalf <cmetcalf@tilera.com>, 2011. | |
4 | ||
5 | The GNU C Library is free software; you can redistribute it and/or | |
6 | modify it under the terms of the GNU Lesser General Public | |
7 | License as published by the Free Software Foundation; either | |
8 | version 2.1 of the License, or (at your option) any later version. | |
9 | ||
10 | The GNU C Library is distributed in the hope that it will be useful, | |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
13 | Lesser General Public License for more details. | |
14 | ||
15 | You should have received a copy of the GNU Lesser General Public | |
ab84e3ff PE |
16 | License along with the GNU C Library. If not, see |
17 | <http://www.gnu.org/licenses/>. */ | |
a63c7fa1 | 18 | |
a0941175 SE |
19 | /* Hide the prototype for __lxstat so that GCC will not complain about |
20 | the different function signature if it is aliased to __lxstat64. | |
21 | If XSTAT_IS_XSTAT64 is set to non-zero then the stat and stat64 | |
22 | structures have an identical layout but different type names. */ | |
23 | ||
24 | #define __lxstat __lxstat_disable | |
25 | ||
a63c7fa1 CM |
26 | #include <errno.h> |
27 | #include <stddef.h> | |
28 | #include <fcntl.h> | |
29 | #include <sys/stat.h> | |
30 | #include <kernel_stat.h> | |
31 | ||
32 | #include <sysdep.h> | |
33 | #include <sys/syscall.h> | |
34 | ||
35 | /* Get information about the file NAME in BUF. */ | |
36 | int | |
37 | __lxstat64 (int vers, const char *name, struct stat64 *buf) | |
38 | { | |
39 | if (vers == _STAT_VER_KERNEL) | |
40 | return INLINE_SYSCALL (fstatat64, 4, AT_FDCWD, name, buf, | |
41 | AT_SYMLINK_NOFOLLOW); | |
42 | errno = EINVAL; | |
43 | return -1; | |
44 | } | |
45 | hidden_def (__lxstat64) | |
a0941175 SE |
46 | |
47 | #undef __lxstat | |
48 | #if XSTAT_IS_XSTAT64 | |
49 | strong_alias (__lxstat64, __lxstat) | |
50 | hidden_ver (__lxstat64, __lxstat) | |
51 | #endif |