-
Notifications
You must be signed in to change notification settings - Fork 211
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #135 from yunwei37/test1
Add more time syscalls and fix `touch` command in busybox
- Loading branch information
Showing
11 changed files
with
420 additions
and
49 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
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 |
---|---|---|
@@ -0,0 +1,44 @@ | ||
//! consts for fctnl | ||
//! currently support x86_64 only | ||
//! copy from fcntl.h (from rCore) | ||
#![allow(dead_code)] | ||
|
||
use bitflags::bitflags; | ||
|
||
const F_LINUX_SPECIFIC_BASE: usize = 1024; | ||
|
||
bitflags! { | ||
pub struct FcntlFlags: usize { | ||
/// dup | ||
const F_DUPFD = 0; | ||
/// get close_on_exec | ||
const F_GETFD = 1; | ||
/// set/clear close_on_exec | ||
const F_SETFD = 2; | ||
/// get file->f_flags | ||
const F_GETFL = 3; | ||
/// set file->f_flags | ||
const F_SETFL = 4; | ||
/// Get record locking info. | ||
const F_GETLK = 5; | ||
/// Set record locking info (non-blocking). | ||
const F_SETLK = 6; | ||
/// Set record locking info (blocking). | ||
const F_SETLKW = 7; | ||
/// closed during a successful execve | ||
const FD_CLOEXEC = 1; | ||
/// like F_DUPFD, but additionally set the close-on-exec flag | ||
const F_DUPFD_CLOEXEC = F_LINUX_SPECIFIC_BASE + 6; | ||
} | ||
} | ||
|
||
bitflags! { | ||
pub struct FileFlags: usize { | ||
/// not blocking | ||
const O_NONBLOCK = 0o4000; | ||
/// move the flag bit to the end of the file before each write | ||
const O_APPEND = 0o2000; | ||
/// set close_on_exec | ||
const O_CLOEXEC = 0o2000000; | ||
} | ||
} |
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
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
Oops, something went wrong.