-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7717418
commit b16508c
Showing
3 changed files
with
24 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,23 @@ | ||
use bitflags::bitflags; | ||
use core::ffi::c_int; | ||
|
||
pub const AT_FDCWD: c_int = -100; | ||
|
||
bitflags! { | ||
/// Flags for `open` and related functions. | ||
#[repr(transparent)] | ||
#[derive(Debug, Clone, Copy, PartialEq, Eq)] | ||
pub struct OpenFlags: c_int { | ||
const O_RDONLY = 0x00000000; | ||
const O_WRONLY = 0x00000001; | ||
const O_RDWR = 0x00000002; | ||
const O_ACCMODE = Self::O_WRONLY.bits() | Self::O_RDWR.bits(); | ||
const O_SHLOCK = 0x00000010; | ||
const O_EXLOCK = 0x00000020; | ||
const O_CREAT = 0x00000200; | ||
const O_TRUNC = 0x00000400; | ||
const O_EXCL = 0x00000800; | ||
const O_EXEC = 0x00040000; | ||
const O_CLOEXEC = 0x00100000; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters