Home | History | Annotate | Download | only in bionic

Lines Matching refs:flags

38 static inline int force_O_LARGEFILE(int flags) {
40 return flags; // No need, and aarch64's strace gets confused.
42 return flags | O_LARGEFILE;
46 static inline bool needs_mode(int flags) {
47 return ((flags & O_CREAT) == O_CREAT) || ((flags & O_TMPFILE) == O_TMPFILE);
55 int open(const char* pathname, int flags, ...) {
58 if (needs_mode(flags)) {
60 va_start(args, flags);
65 return __openat(AT_FDCWD, pathname, force_O_LARGEFILE(flags), mode);
69 int __open_2(const char* pathname, int flags) {
70 if (needs_mode(flags)) __fortify_fatal("open: called with O_CREAT/O_TMPFILE but no mode");
71 return __openat(AT_FDCWD, pathname, force_O_LARGEFILE(flags), 0);
74 int openat(int fd, const char *pathname, int flags, ...) {
77 if (needs_mode(flags)) {
79 va_start(args, flags);
84 return __openat(fd, pathname, force_O_LARGEFILE(flags), mode);
88 int __openat_2(int fd, const char* pathname, int flags) {
89 if (needs_mode(flags)) __fortify_fatal("open: called with O_CREAT/O_TMPFILE but no mode");
90 return __openat(fd, pathname, force_O_LARGEFILE(flags), 0);