properly handle return codes
[project/procd.git] / initd / early.c
index beb7b69..593449b 100644 (file)
@@ -21,7 +21,6 @@
 #include <unistd.h>
 #include <stdlib.h>
 
-#include "../log.h"
 #include "init.h"
 
 static void
@@ -78,7 +77,8 @@ early_mounts(void)
        mkdir("/tmp/run", 0777);
        mkdir("/tmp/lock", 0777);
        mkdir("/tmp/state", 0777);
-       symlink("/tmp", "/var");
+       if (symlink("/tmp", "/var"))
+               ERROR("failed to symlink /tmp -> /var\n");
 }
 
 static void