Lines Matching defs:oflags
48 static int oflag_convert_mode(int oflags)
53 if ((oflags & O_ACCMODE) == O_RDONLY)
55 if (oflags & O_WRONLY)
57 if (oflags & O_RDWR)
62 if (oflags & O_CREAT)
67 if (oflags & O_TRUNC)
72 if (oflags & O_EXCL)
74 if (oflags & O_APPEND)
79 if (oflags & O_EXECVE)
145 int fp_open(int dirfd, const char *path, int oflags, mode_t mode)
168 if (OsDevLimitCheckPermission(vnode->type, fullpath, oflags) != LOS_OK)
180 int fd = block_proxy(fullpath, oflags);
187 if (OsDevLimitCheckPermission(vnode->type, fullpath, oflags) != LOS_OK)
197 (((oflags & O_ACCMODE) != O_RDONLY) || (oflags & O_TRUNC)))
203 if ((oflags & O_CREAT) && (oflags & O_EXCL))
215 accmode = oflag_convert_mode(oflags);
224 if ((ret != OK) && (oflags & O_CREAT) && vnode)
258 if (oflags & O_TRUNC)
281 filep = files_allocate(vnode, oflags, 0, NULL, FILE_START_FD);
318 int do_open(int dirfd, const char *path, int oflags, mode_t mode)
323 if ((oflags & (O_WRONLY | O_CREAT)) != 0)
329 fd = fp_open(dirfd, path, oflags, mode);
350 int open(const char *path, int oflags, ...)
355 va_start(ap, oflags);
360 return do_open(AT_FDCWD, path, oflags, mode);