+ k = conf_files_list(&files, ".list", NULL,
+ "/etc/systemd/ntp-units.d",
+ "/run/systemd/ntp-units.d",
+ "/usr/local/lib/systemd/ntp-units.d",
+ "/usr/lib/systemd/ntp-units.d",
+ NULL);
+ if (k < 0)
+ return NULL;
+
+ STRV_FOREACH(i, files) {
+ _cleanup_fclose_ FILE *f;
+
+ f = fopen(*i, "re");
+ if (!f)
+ continue;
+
+ for (;;) {
+ char line[PATH_MAX], *l;
+
+ if (!fgets(line, sizeof(line), f)) {
+
+ if (ferror(f))
+ log_error("Failed to read NTP units file: %m");
+
+ break;
+ }
+
+ l = strstrip(line);
+ if (l[0] == 0 || l[0] == '#')
+ continue;
+
+ if (strv_extend(&r, l) < 0) {
+ log_oom();
+ return NULL;
+ }
+ }
+ }
+
+ i = r;
+ r = NULL; /* avoid cleanup */
+
+ return strv_uniq(i);