chiark / gitweb /
util: conf_files_list() return list as parameter
[elogind.git] / src / tmpfiles.c
index 1574a199fbf3ab50e54e01b4adf2766b9f136913..f36a75f8f2f9e2e6ee05cdb20bb41700e34e8e3b 100644 (file)
@@ -963,11 +963,16 @@ int main(int argc, char *argv[]) {
         } else {
                 char **files, **f;
 
-                files = conf_files_list(".conf",
-                                        "/run/tmpfiles.d",
-                                        "/etc/tmpfiles.d",
-                                        "/usr/lib/tmpfiles.d",
-                                        NULL);
+                r = conf_files_list(&files, ".conf",
+                                    "/run/tmpfiles.d",
+                                    "/etc/tmpfiles.d",
+                                    "/usr/lib/tmpfiles.d",
+                                    NULL);
+                if (r < 0) {
+                        r = EXIT_FAILURE;
+                        log_error("Failed to enumerate tmpfiles.d files: %s", strerror(-r));
+                        goto finish;
+                }
 
                 STRV_FOREACH(f, files) {
                         if (read_config_file(*f, true) < 0)