chiark / gitweb /
ask-password: add basic tty agent
[elogind.git] / src / conf-parser.c
index d18b2a150daafeba8bb5259f45d8700a38ee9a01..aac64b29a3811c734ecc121f5b4ecaa7f6178ee7 100644 (file)
@@ -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,