Rev 2 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
2 | pj | 1 | |
2 | #include <fs/types.h> |
||
3 | #include <fs/stat.h> |
||
4 | #include <fs/task.h> |
||
5 | |||
6 | #include "file.h" |
||
7 | #include "fs.h" |
||
8 | |||
9 | __mode_t k_umask(__mode_t newmask) |
||
10 | { |
||
11 | __mode_t oldmask; |
||
12 | __pid_t pid; |
||
13 | |||
14 | call_to_fs(); |
||
15 | |||
16 | pid=__get_pid(); |
||
17 | lock_desctable(pid); |
||
18 | oldmask=*umask_ptr(pid); |
||
19 | *umask_ptr(pid)=newmask&__ACCESSPERMS; |
||
20 | unlock_desctable(pid); |
||
21 | return_from_fs(oldmask); |
||
22 | } |