repo.or.cz
/
pintos.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Wording improvements, from "Valentin I. Spitkovsky"
[pintos.git]
/
src
/
examples
/
mkdir.c
blob
7ddbc3f9d38e2d90d5895553a12a982da3966128
1
/* mkdir.c
2
3
Creates a directory. */
4
5
#include <stdio.h>
6
#include <syscall.h>
7
8
int
9
main
(
int
argc
,
char
*
argv
[])
10
{
11
if
(
argc
!=
2
)
12
{
13
printf
(
"usage: %s DIRECTORY
\n
"
,
argv
[
0
]);
14
return
EXIT_FAILURE
;
15
}
16
17
if
(!
mkdir
(
argv
[
1
]))
18
{
19
printf
(
"%s: mkdir failed
\n
"
,
argv
[
1
]);
20
return
EXIT_FAILURE
;
21
}
22
23
return
EXIT_SUCCESS
;
24
}