mirror of
https://github.com/Dasharo/systemd.git
synced 2026-03-06 15:02:31 -08:00
udev_rules_parse_file: do not ignore ENOENT when invoked by udevadm verify
Make sure the ENOENT exception reintroduced by commit
9db7081d83 is not applied when the parser
is invoked by udevadm verify.
This commit is contained in:
committed by
Yu Watanabe
parent
ee2975a9d9
commit
139203e1d4
@@ -1437,7 +1437,7 @@ int udev_rules_parse_file(UdevRules *rules, const char *filename, bool extra_che
|
||||
|
||||
f = fopen(filename, "re");
|
||||
if (!f) {
|
||||
if (errno == ENOENT)
|
||||
if (!extra_checks && errno == ENOENT)
|
||||
return 0;
|
||||
|
||||
return log_warning_errno(errno, "Failed to open %s, ignoring: %m", filename);
|
||||
|
||||
@@ -97,6 +97,8 @@ assert_1 --resolve-names=now
|
||||
# Failed to parse rules file .: Is a directory
|
||||
cp "${workdir}/default_output_1_fail" "${exo}"
|
||||
assert_1 .
|
||||
# Failed to parse rules file ./nosuchfile: No such file or directory
|
||||
assert_1 ./nosuchfile
|
||||
# Failed to parse rules file .: Is a directory
|
||||
cat >"${exo}" <<EOF
|
||||
|
||||
|
||||
Reference in New Issue
Block a user