mirror of
https://github.com/troglobit/finit.git
synced 2026-10-01 13:33:09 +07: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:
+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