Skip to content

Commit

Permalink
Minor Bug Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
whokilleddb committed Jan 29, 2022
1 parent fea6992 commit f0fd512
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion include/mountns.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ static void prepare_mount_ns(char* rootfs){

// mkdir put_old
const char *put_old = ".put_old";
if(mkdir(put_old,0777) && errno != EEXIST ){
if((mkdir(put_old,0777) != 0) && (errno != EEXIST)){
exit_on_error("Could not create .put_old");
}

Expand Down
4 changes: 2 additions & 2 deletions include/proc_ns.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@

static void prepare_procfs(){
// mkdir /proc
if (mkdir("/proc", 0555) && errno != EEXIST){
if ((mkdir("/proc", 0555) != 0) && (errno != EEXIST)){
exit_on_error("Failed to mkdir /proc");
}

// mount proc
if (mount("proc", "/proc", "proc", 0, "")){
exit_on_error("Failed to mount proc: %m\n");
exit_on_error("Failed to mount proc");
}
}

0 comments on commit f0fd512

Please sign in to comment.