summaryrefslogtreecommitdiff
path: root/src/conf-parser.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-10-25 20:35:17 +0200
committerLennart Poettering <lennart@poettering.net>2010-10-25 20:36:01 +0200
commitec863ba65a41e58680a3ab15841243088284e808 (patch)
treeb92316794d11a99154bcd1eea32741b1f8b87fc7 /src/conf-parser.c
parentf015eca2a2f4186208930cf23196967ed425e2c9 (diff)
ask-password: add basic tty agent
Diffstat (limited to 'src/conf-parser.c')
-rw-r--r--src/conf-parser.c25
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,