mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-08-01 00:22:49 +03:00
log: properly return -EINVAL from log_set_max_level_from_string()
If we just return the value we got from log_level_from_string() on failure we'll return -1, which is not a proper error code. log_set_target_from_string() did get this right already, hence let's fix this here too.
This commit is contained in:
@ -922,7 +922,7 @@ int log_set_max_level_from_string(const char *e) {
|
||||
|
||||
t = log_level_from_string(e);
|
||||
if (t < 0)
|
||||
return t;
|
||||
return -EINVAL;
|
||||
|
||||
log_set_max_level(t);
|
||||
return 0;
|
||||
|
Reference in New Issue
Block a user