Merge pull request #33426 from aafeijoo-suse/conf-parser-parse-size-log

conf-parser: print why config_parse_iec_uint64() fails
This commit is contained in:
Yu Watanabe 2024-06-20 23:56:59 +09:00 committed by GitHub
commit 912730a2d5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -172,7 +172,7 @@ static int next_assignment(
/* Parse a single logical line */
static int parse_line(
const char* unit,
const char *unit,
const char *filename,
unsigned line,
const char *sections,
@ -869,7 +869,7 @@ DEFINE_PARSER(mode, mode_t, parse_mode);
DEFINE_PARSER(pid, pid_t, parse_pid);
int config_parse_iec_size(
const char* unit,
const char *unit,
const char *filename,
unsigned line,
const char *section,
@ -901,7 +901,7 @@ int config_parse_iec_size(
}
int config_parse_si_uint64(
const char* unit,
const char *unit,
const char *filename,
unsigned line,
const char *section,
@ -927,7 +927,7 @@ int config_parse_si_uint64(
}
int config_parse_iec_uint64(
const char* unit,
const char *unit,
const char *filename,
unsigned line,
const char *section,
@ -947,13 +947,13 @@ int config_parse_iec_uint64(
r = parse_size(rvalue, 1024, bytes);
if (r < 0)
log_syntax(unit, LOG_WARNING, filename, line, r, "Failed to parse size value, ignoring: %s", rvalue);
log_syntax(unit, LOG_WARNING, filename, line, r, "Failed to parse size value '%s', ignoring: %m", rvalue);
return 0;
}
int config_parse_iec_uint64_infinity(
const char* unit,
const char *unit,
const char *filename,
unsigned line,
const char *section,
@ -977,7 +977,7 @@ int config_parse_iec_uint64_infinity(
}
int config_parse_bool(
const char* unit,
const char *unit,
const char *filename,
unsigned line,
const char *section,
@ -1037,7 +1037,7 @@ int config_parse_id128(
}
int config_parse_tristate(
const char* unit,
const char *unit,
const char *filename,
unsigned line,
const char *section,
@ -1637,7 +1637,7 @@ int config_parse_rlimit(
}
int config_parse_permille(
const char* unit,
const char *unit,
const char *filename,
unsigned line,
const char *section,
@ -1668,7 +1668,7 @@ int config_parse_permille(
}
int config_parse_vlanprotocol(
const char* unit,
const char *unit,
const char *filename,
unsigned line,
const char *section,