shared: use -EINVAL for _UNIT_FILE_CHANGE_TYPE_INVALID
Follow-up of #11484
This commit is contained in:
@@ -2389,9 +2389,9 @@ int bus_deserialize_and_dump_unit_file_changes(sd_bus_message *m, bool quiet, Un
|
||||
/* We expect only "success" changes to be sent over the bus.
|
||||
Hence, reject anything negative. */
|
||||
UnitFileChangeType ch = unit_file_change_type_from_string(type);
|
||||
|
||||
if (ch < 0) {
|
||||
log_notice("Manager reported unknown change type \"%s\" for path \"%s\", ignoring.", type, path);
|
||||
log_notice_errno(ch, "Manager reported unknown change type \"%s\" for path \"%s\", ignoring.",
|
||||
type, path);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ enum UnitFileChangeType {
|
||||
UNIT_FILE_IS_MASKED,
|
||||
UNIT_FILE_IS_DANGLING,
|
||||
_UNIT_FILE_CHANGE_TYPE_MAX,
|
||||
_UNIT_FILE_CHANGE_TYPE_INVALID = INT_MIN
|
||||
_UNIT_FILE_CHANGE_TYPE_INVALID = -EINVAL,
|
||||
};
|
||||
|
||||
enum UnitFileFlags {
|
||||
|
||||
Reference in New Issue
Block a user