chiark / gitweb /
service: fix serialization of exec id
[elogind.git] / load-fragment.c
index 680f04171f819ae239a60589b09fd9e1f32f5c41..f7d5382a73d7406264a9f6ec3f0f4bc3266b07be 100644 (file)
@@ -411,7 +411,6 @@ static int config_parse_usec(
                 void *userdata) {
 
         usec_t *usec = data;
-        unsigned long long u;
         int r;
 
         assert(filename);
@@ -419,17 +418,11 @@ static int config_parse_usec(
         assert(rvalue);
         assert(data);
 
-        if ((r = safe_atollu(rvalue, &u)) < 0) {
+        if ((r = parse_usec(rvalue, usec)) < 0) {
                 log_error("[%s:%u] Failed to parse time value: %s", filename, line, rvalue);
                 return r;
         }
 
-        /* We actually assume the user configures seconds. Later on we
-         * might choose to support suffixes for time values, to
-         * configure bigger or smaller units */
-
-        *usec = u * USEC_PER_SEC;
-
         return 0;
 }
 
@@ -1101,7 +1094,10 @@ static void dump_items(FILE *f, const ConfigItem *items) {
                 { config_parse_kill_mode,        "KILLMODE" },
                 { config_parse_listen,           "SOCKET [...]" },
                 { config_parse_socket_bind,      "SOCKETBIND" },
-                { config_parse_bindtodevice,     "NETWORKINTERFACE" }
+                { config_parse_bindtodevice,     "NETWORKINTERFACE" },
+                { config_parse_usec,             "SECONDS" },
+                { config_parse_path_strv,        "PATH [...]" },
+                { config_parse_mount_flags,      "MOUNTFLAG [...]" }
         };
 
         assert(f);