Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
破败王者之剑
OSKernel2022-LOS
Commits
cdf115d3
Commit
cdf115d3
authored
3 years ago
by
last-las
Browse files
Options
Download
Patches
Plain Diff
feat: add constants related to filesystem
parent
c40763c6
game
fat32_dev
heap_dev
master
match
test_oskernel
vfs_dev
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
share/src/file.rs
+12
-0
share/src/file.rs
share/src/ipc.rs
+3
-0
share/src/ipc.rs
share/src/lib.rs
+1
-0
share/src/lib.rs
share/src/syscall/sys_const.rs
+11
-0
share/src/syscall/sys_const.rs
with
27 additions
and
0 deletions
+27
-0
share/src/file.rs
0 → 100644
+
12
−
0
View file @
cdf115d3
bitflags!
{
pub
struct
OpenFlag
:
u32
{
const
RDONLY
=
0x0
;
const
WRONLY
=
0x1
;
const
RDWR
=
0x2
;
const
CREAT
=
0x40
;
const
EXCL
=
0x80
;
const
TRUNC
=
0x200
;
const
APPEND
=
0x400
;
const
DIRECTORY
=
0x10000
;
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
share/src/ipc.rs
+
3
−
0
View file @
cdf115d3
...
...
@@ -9,6 +9,9 @@ pub const WRITE: usize = 4;
pub
const
IOCTL
:
usize
=
5
;
pub
const
CLOSE
:
usize
=
6
;
pub
const
REPLY
:
usize
=
7
;
pub
const
FORK
:
usize
=
8
;
// process to filesystem
pub
const
EXIT
:
usize
=
9
;
// process to filesystem
pub
const
FSYSCALL
:
usize
=
10
;
// process to filesystem, when process inovke filesystem syscall like 'open'
/* Args position constant */
pub
const
MSG_ARGS_0
:
usize
=
0
;
...
...
This diff is collapsed.
Click to expand it.
share/src/lib.rs
+
1
−
0
View file @
cdf115d3
...
...
@@ -5,6 +5,7 @@ pub mod syscall;
pub
mod
util
;
pub
mod
ffi
;
pub
mod
terminal
;
pub
mod
file
;
extern
crate
alloc
;
#[macro_use]
...
...
This diff is collapsed.
Click to expand it.
share/src/syscall/sys_const.rs
+
11
−
0
View file @
cdf115d3
// filesystem syscall.
pub
const
SYSCALL_GETCWD
:
usize
=
17
;
pub
const
SYSCALL_DUP
:
usize
=
23
;
pub
const
SYSCALL_DUP3
:
usize
=
24
;
pub
const
SYSCALL_MKDIRAT
:
usize
=
34
;
pub
const
SYSCALL_UNMOUNT
:
usize
=
39
;
pub
const
SYSCALL_MOUNT
:
usize
=
40
;
pub
const
SYSCALL_CHDIR
:
usize
=
49
;
pub
const
SYSCALL_OPEN
:
usize
=
56
;
pub
const
SYSCALL_CLOSE
:
usize
=
57
;
pub
const
SYSCALL_READ
:
usize
=
63
;
pub
const
_SYSCALL_READ
:
usize
=
KCALL_MASK
|
SYSCALL_READ
;
pub
const
SYSCALL_WRITE
:
usize
=
64
;
pub
const
_SYSCALL_WRITE
:
usize
=
KCALL_MASK
|
SYSCALL_WRITE
;
pub
const
SYSCALL_EXIT
:
usize
=
93
;
pub
const
SYSCALL_YIELD
:
usize
=
124
;
pub
const
SYSCALL_GET_PRIORITY
:
usize
=
140
;
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets