summaryrefslogtreecommitdiffstats
path: root/initd
diff options
context:
space:
mode:
Diffstat (limited to 'initd')
-rw-r--r--initd/early.c3
-rw-r--r--initd/mkdev.c4
-rw-r--r--initd/preinit.c3
3 files changed, 5 insertions, 5 deletions
diff --git a/initd/early.c b/initd/early.c
index 5ee49ee..593449b 100644
--- a/initd/early.c
+++ b/initd/early.c
@@ -77,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
diff --git a/initd/mkdev.c b/initd/mkdev.c
index 5ac6e95..e6d3d0c 100644
--- a/initd/mkdev.c
+++ b/initd/mkdev.c
@@ -121,7 +121,5 @@ int mkdev(const char *name, int _mode)
n_patterns = 1;
find_devs(true);
find_devs(false);
- chdir("/");
-
- return 0;
+ return chdir("/");
}
diff --git a/initd/preinit.c b/initd/preinit.c
index fb94527..f38d8ef 100644
--- a/initd/preinit.c
+++ b/initd/preinit.c
@@ -38,7 +38,8 @@ check_dbglvl(void)
if (!fp)
return;
- fscanf(fp, "%d", &lvl);
+ if (fscanf(fp, "%d", &lvl) == EOF)
+ ERROR("failed to read debug level\n");
fclose(fp);
unlink("/tmp/debug_level");