diff options
Diffstat (limited to 'src/conf-parser.c')
-rw-r--r-- | src/conf-parser.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/conf-parser.c b/src/conf-parser.c index d18b2a150d..aac64b29a3 100644 --- a/src/conf-parser.c +++ b/src/conf-parser.c @@ -246,6 +246,31 @@ int config_parse_int( return 0; } +int config_parse_uint64( + const char *filename, + unsigned line, + const char *section, + const char *lvalue, + const char *rvalue, + void *data, + void *userdata) { + + uint64_t *u = data; + int r; + + assert(filename); + assert(lvalue); + assert(rvalue); + assert(data); + + if ((r = safe_atou64(rvalue, u)) < 0) { + log_error("[%s:%u] Failed to parse numeric value: %s", filename, line, rvalue); + return r; + } + + return 0; +} + int config_parse_unsigned( const char *filename, unsigned line, |