mirror of
https://github.com/troglobit/finit.git
synced 2026-10-16 10:39:35 +00:00
initctl: Check mkdir() for error and give helpful message on fail
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
7fc515678f
commit
6a5f4398a2
1 file changed
+2
-1
+2
-1
@@ -140,7 +140,8 @@ int serv_enable(char *arg)
|
||||
}
|
||||
|
||||
pushd(FINIT_RCSD);
|
||||
mkdir("enabled", 0755);
|
||||
if (mkdir("enabled", 0755))
|
||||
err(1, "Failed creating %s/enabled directory", FINIT_RCSD);
|
||||
|
||||
snprintf(path, sizeof(path), "%s/%s", available, arg);
|
||||
if (!fexist(path))
|
||||
|
||||
Reference in new issue
Block a user