summaryrefslogtreecommitdiff
path: root/load-fragment.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-04-23 20:26:59 +0200
committerLennart Poettering <lennart@poettering.net>2010-04-23 20:26:59 +0200
commit24a6e4a401f0be0c4cd67621186792d0b7e401a1 (patch)
tree4eb964777415835d384bfc45e814980a8a0a2f73 /load-fragment.c
parent40d50879d9339e539a30e5d32234baffb732f0f9 (diff)
load-fragment: allow timeout specifications such as '7min 5s'
Diffstat (limited to 'load-fragment.c')
-rw-r--r--load-fragment.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/load-fragment.c b/load-fragment.c
index 680f04171f..ff3b29c084 100644
--- a/load-fragment.c
+++ b/load-fragment.c
@@ -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;
}