Blame SOURCES/0108-calendar-support-yearly-and-annually-names-the-same-.patch
|
|
65878a |
From 9e4b36ca509cdcb39afaa9fc7a0f1901b8855647 Mon Sep 17 00:00:00 2001
|
|
|
65878a |
From: Lennart Poettering <lennart@poettering.net>
|
|
|
65878a |
Date: Tue, 19 Nov 2013 01:13:42 +0100
|
|
|
65878a |
Subject: [PATCH] calendar: support 'yearly' and 'annually' names the same way
|
|
|
65878a |
as cron
|
|
|
65878a |
|
|
|
65878a |
---
|
|
|
65878a |
src/shared/calendarspec.c | 17 +++++++++++++++++
|
|
|
65878a |
1 file changed, 17 insertions(+)
|
|
|
65878a |
|
|
|
65878a |
diff --git a/src/shared/calendarspec.c b/src/shared/calendarspec.c
|
|
|
65878a |
index 7979e23..7075159 100644
|
|
|
65878a |
--- a/src/shared/calendarspec.c
|
|
|
65878a |
+++ b/src/shared/calendarspec.c
|
|
|
65878a |
@@ -686,6 +686,23 @@ int calendar_spec_from_string(const char *p, CalendarSpec **spec) {
|
|
|
65878a |
if (r < 0)
|
|
|
65878a |
goto fail;
|
|
|
65878a |
|
|
|
65878a |
+ } else if (strcaseeq(p, "anually") || strcaseeq(p, "yearly")) {
|
|
|
65878a |
+ r = const_chain(1, &c->month);
|
|
|
65878a |
+ if (r < 0)
|
|
|
65878a |
+ goto fail;
|
|
|
65878a |
+ r = const_chain(1, &c->day);
|
|
|
65878a |
+ if (r < 0)
|
|
|
65878a |
+ goto fail;
|
|
|
65878a |
+ r = const_chain(0, &c->hour);
|
|
|
65878a |
+ if (r < 0)
|
|
|
65878a |
+ goto fail;
|
|
|
65878a |
+ r = const_chain(0, &c->minute);
|
|
|
65878a |
+ if (r < 0)
|
|
|
65878a |
+ goto fail;
|
|
|
65878a |
+ r = const_chain(0, &c->second);
|
|
|
65878a |
+ if (r < 0)
|
|
|
65878a |
+ goto fail;
|
|
|
65878a |
+
|
|
|
65878a |
} else if (strcaseeq(p, "weekly")) {
|
|
|
65878a |
|
|
|
65878a |
c->weekdays_bits = 1;
|