interplane.Get Omega
Read in your language

aienux

Aienux, the AienOS kernel: boot, scheduling, IPC and capability boundaries. Pre-alpha; host, emulator and physical evidence are labelled separately.

Brought by drakestapleton

branch main Branches Tags History

aienux / vendor / libc / src / new / qurt / sys / stat.rs

36 lines · 1130 bytes Raw Blame History
1//! Header: `sys/stat.h`
2
3use super::super::*;
4use crate::prelude::*;
5
6// File type constants for stat.st_mode
7pub const S_IFMT: mode_t = 0o170000;
8pub const S_IFSOCK: mode_t = 0o140000;
9pub const S_IFLNK: mode_t = 0o120000;
10pub const S_IFREG: mode_t = 0o100000;
11pub const S_IFBLK: mode_t = 0o060000;
12pub const S_IFDIR: mode_t = 0o040000;
13pub const S_IFCHR: mode_t = 0o020000;
14pub const S_IFIFO: mode_t = 0o010000;
15
16// File permission constants
17pub const S_ISUID: mode_t = 0o4000;
18pub const S_ISGID: mode_t = 0o2000;
19pub const S_ISVTX: mode_t = 0o1000;
20pub const S_IRWXU: mode_t = 0o0700;
21pub const S_IRUSR: mode_t = 0o0400;
22pub const S_IWUSR: mode_t = 0o0200;
23pub const S_IXUSR: mode_t = 0o0100;
24pub const S_IRWXG: mode_t = 0o0070;
25pub const S_IRGRP: mode_t = 0o0040;
26pub const S_IWGRP: mode_t = 0o0020;
27pub const S_IXGRP: mode_t = 0o0010;
28pub const S_IRWXO: mode_t = 0o0007;
29pub const S_IROTH: mode_t = 0o0004;
30pub const S_IWOTH: mode_t = 0o0002;
31pub const S_IXOTH: mode_t = 0o0001;
32
33extern "C" {
34 pub fn stat(pathname: *const c_char, statbuf: *mut stat) -> c_int;
35 pub fn fstat(fd: c_int, statbuf: *mut stat) -> c_int;
36}