Implement O_DIRECTORY, switch to open for mkdir
This commit is contained in:
parent
09fb7d1d69
commit
c018bfe5ef
10 changed files with 33 additions and 44 deletions
|
@ -93,9 +93,9 @@ pub fn cpu_count() -> usize {
|
|||
pub extern fn userspace_init() {
|
||||
assert_eq!(syscall::chdir(b"initfs:bin"), Ok(0));
|
||||
|
||||
assert_eq!(syscall::open(b"debug:", 0).map(FileHandle::into), Ok(0));
|
||||
assert_eq!(syscall::open(b"debug:", 0).map(FileHandle::into), Ok(1));
|
||||
assert_eq!(syscall::open(b"debug:", 0).map(FileHandle::into), Ok(2));
|
||||
assert_eq!(syscall::open(b"debug:", syscall::flag::O_RDONLY).map(FileHandle::into), Ok(0));
|
||||
assert_eq!(syscall::open(b"debug:", syscall::flag::O_WRONLY).map(FileHandle::into), Ok(1));
|
||||
assert_eq!(syscall::open(b"debug:", syscall::flag::O_WRONLY).map(FileHandle::into), Ok(2));
|
||||
|
||||
syscall::exec(b"initfs:bin/init", &[]).expect("failed to execute initfs:init");
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue