Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
redox-os
syscall
Commits
cbb39163
Verified
Commit
cbb39163
authored
Nov 16, 2018
by
Jeremy Soller
Browse files
Add umask
parent
de0f0624
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/call.rs
View file @
cbb39163
...
...
@@ -327,6 +327,11 @@ pub fn sigreturn() -> Result<usize> {
unsafe
{
syscall0
(
SYS_SIGRETURN
)
}
}
/// Set the file mode creation mask
pub
unsafe
fn
umask
(
mask
:
usize
)
->
Result
<
usize
>
{
syscall1
(
SYS_UMASK
,
mask
)
}
/// Remove a file
pub
fn
unlink
<
T
:
AsRef
<
[
u8
]
>>
(
path
:
T
)
->
Result
<
usize
>
{
unsafe
{
syscall2
(
SYS_UNLINK
,
path
.as_ref
()
.as_ptr
()
as
usize
,
path
.as_ref
()
.len
())
}
...
...
src/number.rs
View file @
cbb39163
...
...
@@ -69,5 +69,6 @@ pub const SYS_SETRENS: usize = 952;
pub
const
SYS_SETREUID
:
usize
=
203
;
pub
const
SYS_SIGACTION
:
usize
=
67
;
pub
const
SYS_SIGRETURN
:
usize
=
119
;
pub
const
SYS_UMASK
:
usize
=
60
;
pub
const
SYS_WAITPID
:
usize
=
7
;
pub
const
SYS_YIELD
:
usize
=
158
;
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment