chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8e64fd1
)
calendar: support 'yearly' and 'annually' names the same way as cron
author
Lennart Poettering
<lennart@poettering.net>
Tue, 19 Nov 2013 00:13:42 +0000
(
01:13
+0100)
committer
Lennart Poettering
<lennart@poettering.net>
Wed, 20 Nov 2013 18:36:14 +0000
(19:36 +0100)
src/shared/calendarspec.c
patch
|
blob
|
history
diff --git
a/src/shared/calendarspec.c
b/src/shared/calendarspec.c
index 7979e2384f53014e105d173519c60acb9a3ac6a9..7075159183152d191b5430fd43cfc5b2a56e3b18 100644
(file)
--- a/
src/shared/calendarspec.c
+++ b/
src/shared/calendarspec.c
@@
-686,6
+686,23
@@
int calendar_spec_from_string(const char *p, CalendarSpec **spec) {
if (r < 0)
goto fail;
+ } else if (strcaseeq(p, "anually") || strcaseeq(p, "yearly")) {
+ r = const_chain(1, &c->month);
+ if (r < 0)
+ goto fail;
+ r = const_chain(1, &c->day);
+ if (r < 0)
+ goto fail;
+ r = const_chain(0, &c->hour);
+ if (r < 0)
+ goto fail;
+ r = const_chain(0, &c->minute);
+ if (r < 0)
+ goto fail;
+ r = const_chain(0, &c->second);
+ if (r < 0)
+ goto fail;
+
} else if (strcaseeq(p, "weekly")) {
c->weekdays_bits = 1;