From 24a6e4a401f0be0c4cd67621186792d0b7e401a1 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 23 Apr 2010 20:26:59 +0200 Subject: load-fragment: allow timeout specifications such as '7min 5s' --- load-fragment.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'load-fragment.c') 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; } -- cgit v1.2.3-54-g00ecf