repo.or.cz
/
minix.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
some coverity fixes.
[minix.git]
/
lib
/
libc
/
sys-minix
/
mknod.c
blob
70c7b8705f2fefc26f2409fdafe73bc536a5ba84
1
#include <sys/cdefs.h>
2
#include
"namespace.h"
3
#include <lib.h>
4
5
#include <string.h>
6
#include <stdlib.h>
7
#include <unistd.h>
8
#include <sys/stat.h>
9
10
int
mknod
(
const char
*
name
,
mode_t mode
,
dev_t dev
)
11
{
12
message m
;
13
14
m
.
m1_i1
=
strlen
(
name
) +
1
;
15
m
.
m1_i2
=
mode
;
16
m
.
m1_i3
=
dev
;
17
m
.
m1_p1
= (
char
*)
__UNCONST
(
name
);
18
m
.
m1_p2
= (
char
*) ((
int
)
0
);
/* obsolete size field */
19
return
(
_syscall
(
VFS_PROC_NR
,
MKNOD
, &
m
));
20
}