This reverts commit
42a467b55219384c7c3b137ab3cc8b6a309a8a14.
We need to skip -ENOENT when loading udev rules because new files with rules
may be added or removed at any time, and the loading of rules is triggered
asynchronously. Even though the window is fairly narrow, udev shouldn't throw
an error if a rules file is removed.
assert(filename);
f = fopen(filename, "re");
- if (!f)
+ if (!f) {
+ if (errno == ENOENT)
+ return 0;
+
return log_warning_errno(errno, "Failed to open %s, ignoring: %m", filename);
+ }
if (fstat(fileno(f), &st) < 0)
return log_warning_errno(errno, "Failed to stat %s, ignoring: %m", filename);