diff --git a/plugins/bootmisc.c b/plugins/bootmisc.c index 4305c658..c8d29ea2 100644 --- a/plugins/bootmisc.c +++ b/plugins/bootmisc.c @@ -64,12 +64,6 @@ static int is_tmpfs(char *path) return tmpfs; } -static void create(char *path, mode_t mode, uid_t uid, gid_t gid) -{ - if (touch(path) || chmod(path, mode) || chown(path, uid, gid)) - _w("Failed creating %s properl.", path); -} - static int do_clean(const char *fpath, const struct stat *UNUSED(sb), int UNUSED(tflag), struct FTW *ftw) { if (ftw->level == 0) diff --git a/src/helpers.h b/src/helpers.h index dcfae8c5..ba52e9d9 100644 --- a/src/helpers.h +++ b/src/helpers.h @@ -30,6 +30,7 @@ #include /* strerror() */ #include #include +#include /* * Error and debug messages @@ -54,8 +55,6 @@ char *runlevel_string (int levels); int pid_alive (pid_t pid); char *pid_get_name (pid_t pid, char *name, size_t len); -void procname_set (char *name, char *args[]); - void print (int action, const char *fmt, ...); void print_desc (char *action, char *desc); int print_result (int fail); @@ -89,6 +88,12 @@ void endfsent(void); struct fstab *getfsent(void); #endif /* HAVE_GETFSENT */ +static inline void create(char *path, mode_t mode, uid_t uid, gid_t gid) +{ + if (touch(path) || chmod(path, mode) || chown(path, uid, gid)) + _w("Failed creating %s properly.", path); +} + #endif /* FINIT_HELPERS_H_ */ /**