login: downgrade log level if the error will be ignored

This commit is contained in:
Yu Watanabe 2020-09-10 15:18:26 +09:00
parent a864170745
commit 196d41bcde
2 changed files with 5 additions and 3 deletions

View File

@ -466,12 +466,14 @@ int config_parse_n_autovts(
r = safe_atou(rvalue, &o);
if (r < 0) {
log_syntax(unit, LOG_ERR, filename, line, r, "Failed to parse number of autovts, ignoring: %s", rvalue);
log_syntax(unit, LOG_WARNING, filename, line, r,
"Failed to parse number of autovts, ignoring: %s", rvalue);
return 0;
}
if (o > 15) {
log_syntax(unit, LOG_ERR, filename, line, r, "A maximum of 15 autovts are supported, ignoring: %s", rvalue);
log_syntax(unit, LOG_WARNING, filename, line, 0,
"A maximum of 15 autovts are supported, ignoring: %s", rvalue);
return 0;
}

View File

@ -919,7 +919,7 @@ int config_parse_tmpfs_size(
if (r >= 0 && (k <= 0 || (uint64_t) (size_t) k != k))
r = -ERANGE;
if (r < 0) {
log_syntax(unit, LOG_ERR, filename, line, r, "Failed to parse size value '%s', ignoring: %m", rvalue);
log_syntax(unit, LOG_WARNING, filename, line, r, "Failed to parse size value '%s', ignoring: %m", rvalue);
return 0;
}