Skip to content
This repository was archived by the owner on May 17, 2019. It is now read-only.

Commit 0cc3bb6

Browse files
author
NerdOfCode
committed
Added more verbosity
1 parent 0bc3c8e commit 0cc3bb6

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

Bin/cmd_src/mkdir.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
#include <stdio.h>
2-
#include <stdlib.h>
32
#include <unistd.h>
43
#include <string.h>
4+
#include <errno.h>
55
#include <sys/types.h>
66
#include <sys/stat.h>
7+
#include "../../Src/globals.h"
78

89
int main(int argc, char *argv[]){
910

11+
int ret = 0;
1012
char buffer[64];
1113
char dir[128] = "";
1214

@@ -24,7 +26,11 @@ int main(int argc, char *argv[]){
2426

2527
strcat(dir, argv[1]);
2628

27-
mkdir(dir, 0755);
29+
ret = mkdir(dir, 0755);
30+
31+
if(ret != 0){
32+
printf(RED_TEXT"%s\n"RESET,strerror(errno));
33+
}
2834

2935
return 0;
3036

0 commit comments

Comments
 (0)