tree-wide: use error codes in xxx_from_string()
This commit is contained in:
@@ -577,7 +577,7 @@ int config_parse_l2tp_session_l2spec(
|
||||
|
||||
spec = l2tp_l2spec_type_from_string(rvalue);
|
||||
if (spec < 0) {
|
||||
log_syntax(unit, LOG_WARNING, filename, line, 0,
|
||||
log_syntax(unit, LOG_WARNING, filename, line, spec,
|
||||
"Failed to parse layer2 specific header type. Ignoring assignment: %s", rvalue);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -139,7 +139,7 @@ int config_parse_netdev_kind(
|
||||
|
||||
k = netdev_kind_from_string(rvalue);
|
||||
if (k < 0) {
|
||||
log_syntax(unit, LOG_WARNING, filename, line, 0, "Failed to parse netdev kind, ignoring assignment: %s", rvalue);
|
||||
log_syntax(unit, LOG_WARNING, filename, line, k, "Failed to parse netdev kind, ignoring assignment: %s", rvalue);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -581,7 +581,8 @@ int config_parse_tunnel_key(const char *unit,
|
||||
if (r < 0) {
|
||||
r = safe_atou32(rvalue, &k);
|
||||
if (r < 0) {
|
||||
log_syntax(unit, LOG_WARNING, filename, line, 0, "Failed to parse tunnel key ignoring assignment: %s", rvalue);
|
||||
log_syntax(unit, LOG_WARNING, filename, line, r,
|
||||
"Failed to parse tunnel key ignoring assignment: %s", rvalue);
|
||||
return 0;
|
||||
}
|
||||
} else
|
||||
|
||||
Reference in New Issue
Block a user