mirror of
https://github.com/troglobit/finit.git
synced 2026-10-24 11:54:36 +00:00
Fix incorrect use of variable arguments in run_parts() and simplify code
The run_parts() implementation used variable arguments in a bad way, resulting in it not working properly. Replaced va_*() code with a simple cmd argument that's passed to each script called. Also, the opendir()/readdir() code has been replaced with scandir() using regular alphasort(). This simplifies the code somewhat as well. Otherwise, minor cleanups. Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
af59174e49
commit
f29d2733c7
7 files changed
+46
-64
No files matched your search
+1
-1
@@ -39,7 +39,7 @@ mode_t fmode(char *file)
|
||||
|
||||
if (!file) {
|
||||
errno = EINVAL;
|
||||
return 0; /* Doesn't exist ... */
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!stat(file, &sb))
|
||||
|
||||
Reference in new issue
Block a user