summaryrefslogtreecommitdiff
path: root/src/basic/calendarspec.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-11-10 16:04:37 +0100
committerLennart Poettering <lennart@poettering.net>2015-11-10 17:31:31 +0100
commit519cffec890510f817740d07355e911b10c203b7 (patch)
treecdc9668c3c8b288df3a4a46de672b33e9e47b953 /src/basic/calendarspec.c
parent75eb615480afd787fa412f0a529523f568f79b26 (diff)
time-util: add parse_time(), which is like parse_sec() but allows specification of default time unit if none is specified
This is useful if we want to parse RLIMIT_RTTIME values where the common UNIX syntax is without any units but refers to a non-second unit (µs in this case), but where we want to allow specification of units.
Diffstat (limited to 'src/basic/calendarspec.c')
-rw-r--r--src/basic/calendarspec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/basic/calendarspec.c b/src/basic/calendarspec.c
index a6a906f453..7151fc3d0c 100644
--- a/src/basic/calendarspec.c
+++ b/src/basic/calendarspec.c
@@ -562,7 +562,7 @@ static int parse_date(const char **p, CalendarSpec *c) {
return -EINVAL;
}
-static int parse_time(const char **p, CalendarSpec *c) {
+static int parse_calendar_time(const char **p, CalendarSpec *c) {
CalendarComponent *h = NULL, *m = NULL, *s = NULL;
const char *t;
int r;
@@ -802,7 +802,7 @@ int calendar_spec_from_string(const char *p, CalendarSpec **spec) {
if (r < 0)
goto fail;
- r = parse_time(&p, c);
+ r = parse_calendar_time(&p, c);
if (r < 0)
goto fail;