-
Notifications
You must be signed in to change notification settings - Fork 213
Add more time syscalls and fix touch command in busybox
#135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
f0c94c5
add time syscalls
yunwei37 ba2313f
Merge branch 'master' of https://github.com/rcore-os/zCore into test1
yunwei37 fd4d369
update some doc and fix clippy
yunwei37 15a6e6c
touch command can create file!
yunwei37 7f14ac0
fix clippy
yunwei37 7744dc4
update file tests for judging
yunwei37 d052929
add touch test and time test
yunwei37 3e7206a
update some tests for non-exist files and doc in fcntl
yunwei37 b072016
fix fcntl.rs
yunwei37 da8929e
some minor fix
yunwei37 9eaa3dc
fix test return value
yunwei37 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.