Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/aienux/blob/main/vendor/libc/src/new/qurt/fcntl.rs # aienux Aienux, the AienOS kernel: boot, scheduling, IPC and capability boundaries. Pre-alpha; host, emulator and physical evidence are labelled separately. Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `aienux / vendor / libc / src / new / qurt / fcntl.rs` 51 lines ยท 1339 bytes Raw Blame History 1 //! Header: `fcntl.h` 2 3 use super::*; 4 use crate::prelude::*; 5 6 // File access modes 7 pub const O_RDONLY: c_int = 0x0000; 8 pub const O_WRONLY: c_int = 0x0001; 9 pub const O_RDWR: c_int = 0x0002; 10 pub const O_ACCMODE: c_int = 0x0003; 11 12 // File creation flags 13 pub const O_CREAT: c_int = 0x0040; 14 pub const O_EXCL: c_int = 0x0080; 15 pub const O_NOCTTY: c_int = 0x0100; 16 pub const O_TRUNC: c_int = 0x0200; 17 18 // File status flags 19 pub const O_APPEND: c_int = 0x0400; 20 pub const O_NONBLOCK: c_int = 0x0800; 21 pub const O_SYNC: c_int = 0x1000; 22 pub const O_FSYNC: c_int = O_SYNC; 23 pub const O_DSYNC: c_int = 0x1000; 24 pub const O_DIRECTORY: c_int = 0x10000; 25 pub const O_NOFOLLOW: c_int = 0x20000; 26 pub const O_CLOEXEC: c_int = 0x80000; 27 28 // fcntl() commands 29 pub const F_DUPFD: c_int = 0; 30 pub const F_GETFD: c_int = 1; 31 pub const F_SETFD: c_int = 2; 32 pub const F_GETFL: c_int = 3; 33 pub const F_SETFL: c_int = 4; 34 pub const F_GETLK: c_int = 5; 35 pub const F_SETLK: c_int = 6; 36 pub const F_SETLKW: c_int = 7; 37 pub const F_DUPFD_CLOEXEC: c_int = 1030; 38 39 // File descriptor flags 40 pub const FD_CLOEXEC: c_int = 1; 41 42 // Lock types for fcntl() 43 pub const F_RDLCK: c_int = 0; 44 pub const F_WRLCK: c_int = 1; 45 pub const F_UNLCK: c_int = 2; 46 47 // Functions 48 extern "C" { 49 pub fn open(pathname: *const c_char, flags: c_int, ...) -> c_int; 50 pub fn fcntl(fd: c_int, cmd: c_int, ...) -> c_int; 51 }