blob: 9bfe50b2bc7d76fa9b8fbf441e0ad92754a79d4e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
#include <assert.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <unistd.h>
int main(int argc, char** argv)
{
if (argc != 2) {
printf("usage: mkdir <path>\n");
return 1;
}
int rc = mkdir(argv[1], 0755);
if (rc < 0) {
perror("mkdir");
return 1;
}
return 0;
}
|