Magellan Linux

Contents of /trunk/mkinitrd-magellan/klibc/usr/klibc/open.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: 433 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 * open.c
3 *
4 * On 32-bit platforms we need to pass O_LARGEFILE to the open()
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__)
14
15 extern int __open(const char *, int, mode_t);
16
17 int open(const char *pathname, int flags, mode_t mode)
18 {
19 return __open(pathname, flags | O_LARGEFILE, mode);
20 }
21
22 #endif