chiark / gitweb /
unit: when JobTimeoutSec= is turned off, implicitly turn off JobRunningTimeoutSec...
authorLennart Poettering <lennart@poettering.net>
Wed, 27 Sep 2017 15:30:50 +0000 (17:30 +0200)
committerSven Eden <yamakuzure@gmx.net>
Fri, 8 Dec 2017 06:35:50 +0000 (07:35 +0100)
We added JobRunningTimeoutSec= late, and Dracut configured only
JobTimeoutSec= to turn of root device timeouts before. With this change
we'll propagate a reset of JobTimeoutSec= into JobRunningTimeoutSec=,
but only if the latter wasn't set explicitly.

This should restore compatibility with older elogind versions.

Fixes: #6402
src/basic/time-util.c

index 0a0f806e8154af3cdb2e3e2958d83613a6654f0f..7f32cf608fb4e174a8a8a8cc5cd460bd3c9fe5e8 100644 (file)
@@ -1097,7 +1097,11 @@ int parse_sec(const char *t, usec_t *usec) {
 
 #if 0 /// UNNEEDED by elogind
 int parse_sec_fix_0(const char *t, usec_t *usec) {
+        assert(t);
+        assert(usec);
+
         t += strspn(t, WHITESPACE);
+
         if (streq(t, "0")) {
                 *usec = USEC_INFINITY;
                 return 0;