When udevadm verify is given an argument that doesn't point to an
existing file, there used to be two diagnostics messages, the first one
at a warning level, and the second one at an error level:
$ build/udevadm verify /no/such/directory
Failed to open /no/such/directory, ignoring: No such file or directory
Failed to parse rules file /no/such/directory: No such file or directory
Fix this by issuing just the error message.
f = fopen(filename, "re");
if (!f) {
- if (!extra_checks && errno == ENOENT)
+ if (extra_checks)
+ return -errno;
+
+ if (errno == ENOENT)
return 0;
return log_warning_errno(errno, "Failed to open %s, ignoring: %m", filename);