mirror of
https://github.com/AuxXxilium/eudev.git
synced 2024-12-04 21:55:44 +07:00
install: fix incorrect 'Access denied' message with a non-existent unit
With "systemctl is-enabled non-existent.service" _UNIT_FILE_STATE_INVALID (-1) was wrongly interpreted as -errno. Return -ENOENT in this case. https://bugzilla.redhat.com/show_bug.cgi?id=766579
This commit is contained in:
parent
ab5919fa1a
commit
81006b8ad8
@ -1571,10 +1571,10 @@ UnitFileState unit_file_get_state(
|
||||
}
|
||||
|
||||
if (lstat(path, &st) < 0) {
|
||||
r = -errno;
|
||||
if (errno == ENOENT)
|
||||
continue;
|
||||
|
||||
r = -errno;
|
||||
goto finish;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user