Magellan Linux

Contents of /trunk/mkinitrd-magellan/klibc/usr/klibc/openat.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 532 - (show annotations) (download)
Sat Sep 1 22:45:15 2007 UTC (16 years, 8 months ago) by niro
File MIME type: text/plain
File size: 490 byte(s)
-import if magellan mkinitrd; it is a fork of redhats mkinitrd-5.0.8 with all magellan patches and features; deprecates magellan-src/mkinitrd

1 /*
2 * openat.c
3 *
4 * On 32-bit platforms we need to pass O_LARGEFILE to the openat()
5 * system call, to indicate that we're 64-bit safe.
6 */
7
8 #define _KLIBC_IN_OPEN_C
9 #include <unistd.h>
10 #include <fcntl.h>
11 #include <bitsize.h>
12
13 #if _BITSIZE == 32 && !defined(__i386__) && defined(__NR_openat)
14
15 extern int __openat(int, const char *, int, mode_t);
16
17 int openat(int dirfd, const char *pathname, int flags, mode_t mode)
18 {
19 return __openat(dirfd, pathname, flags | O_LARGEFILE, mode);
20 }
21
22 #endif