chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
hostnamed: introduce systemd-hostnamed
[elogind.git]
/
src
/
modules-load.c
diff --git
a/src/modules-load.c
b/src/modules-load.c
index a1738bb8b4f25e04d48b094830f1de41ec05a2f6..3824b57de7649293e65793b5e0123a0bdade05d7 100644
(file)
--- a/
src/modules-load.c
+++ b/
src/modules-load.c
@@
-43,7
+43,8
@@
static int scandir_filter(const struct dirent *d) {
return 0;
if (d->d_type != DT_REG &&
return 0;
if (d->d_type != DT_REG &&
- d->d_type != DT_LNK)
+ d->d_type != DT_LNK &&
+ d->d_type != DT_UNKNOWN)
return 0;
return endswith(d->d_name, ".conf");
return 0;
return endswith(d->d_name, ".conf");
@@
-98,14
+99,21
@@
int main(int argc, char *argv[]) {
}
f = fopen(fn, "re");
}
f = fopen(fn, "re");
- free(fn);
if (!f) {
if (!f) {
+ if (errno == ENOENT) {
+ free(fn);
+ continue;
+ }
+
log_error("Failed to open %s: %m", fn);
log_error("Failed to open %s: %m", fn);
+ free(fn);
r = EXIT_FAILURE;
continue;
}
r = EXIT_FAILURE;
continue;
}
+ free(fn);
+
for (;;) {
char line[LINE_MAX], *l, *t;
for (;;) {
char line[LINE_MAX], *l, *t;