summaryrefslogtreecommitdiff
path: root/src/core/load-fragment.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2013-04-02 20:38:16 +0200
committerLennart Poettering <lennart@poettering.net>2013-04-03 20:12:57 +0200
commit7f602784de4fd378120e8ebfe6d830862b9cae03 (patch)
treee10d14f7b9a3154097b5f2cc2cc92ff0028101ed /src/core/load-fragment.c
parent574d5f2dfc25226afc718aa5ba1a145fe5cad221 (diff)
util: rename parse_usec() to parse_sec() sinds the default unit is seconds
Internally we store all time values in usec_t, however parse_usec() actually was used mostly to parse values in seconds (unless explicit units were specified to define a different unit). Hence, be clear about this and name the function about what we pass into it, not what we get out of it.
Diffstat (limited to 'src/core/load-fragment.c')
-rw-r--r--src/core/load-fragment.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/load-fragment.c b/src/core/load-fragment.c
index 65a2a39248..42c181de4d 100644
--- a/src/core/load-fragment.c
+++ b/src/core/load-fragment.c
@@ -1186,7 +1186,7 @@ int config_parse_timer(
id = CLOCK_REALTIME;
} else {
- if (parse_usec(rvalue, &u) < 0) {
+ if (parse_sec(rvalue, &u) < 0) {
log_error("[%s:%u] Failed to parse timer value, ignoring: %s", filename, line, rvalue);
return 0;
}
@@ -1471,7 +1471,7 @@ int config_parse_service_timeout(
assert(rvalue);
assert(s);
- r = config_parse_usec(filename, line, section, lvalue, ltype, rvalue, data, userdata);
+ r = config_parse_sec(filename, line, section, lvalue, ltype, rvalue, data, userdata);
if (r < 0)
return r;
@@ -2395,7 +2395,7 @@ void unit_dump_config_items(FILE *f) {
{ config_parse_socket_listen, "SOCKET [...]" },
{ config_parse_socket_bind, "SOCKETBIND" },
{ config_parse_socket_bindtodevice, "NETWORKINTERFACE" },
- { config_parse_usec, "SECONDS" },
+ { config_parse_sec, "SECONDS" },
{ config_parse_nsec, "NANOSECONDS" },
{ config_parse_path_strv, "PATH [...]" },
{ config_parse_unit_requires_mounts_for, "PATH [...]" },