Relocate helper function, only used by tmpfiles

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg committed 2025-07-06 03:13:59 +02:00
1 parent eb13ccc227
commit 06daf2e4a5
2 files changed
+17 -16

No files matched your search

-16
View File
@@ -207,22 +207,6 @@ static inline char *fgetval(const char *line, const char *key, char *sep)
return realloc(copy, len);
}
static inline int is_dir_empty(const char *path)
{
struct dirent **namelist;
int num;
num = scandir(path, &namelist, NULL, NULL);
if (num < 0)
return 0;
for (int i = 0; i < num; i++)
free(namelist[i]);
free(namelist);
return num >= 3;
}
#endif /* FINIT_HELPERS_H_ */
/**