]> git.ipfire.org Git - thirdparty/systemd.git/commit
tree-wide: don't assume CLOCK_BOOTIME is generally available
authorLennart Poettering <lennart@poettering.net>
Wed, 20 Apr 2016 16:12:57 +0000 (18:12 +0200)
committerLennart Poettering <lennart@poettering.net>
Fri, 22 Apr 2016 14:06:20 +0000 (16:06 +0200)
commit3411372e35fd199d46910b79b8017e9e4ffc8da8
treeef9d747d66b0f4df902e4e9ab3b2d9b0379d9efe
parentf53d86c9295d9ac20981ca26beb6b83ad1f4296d
tree-wide: don't assume CLOCK_BOOTIME is generally available

Before we invoke now(CLOCK_BOOTTIME), let's make sure we actually have that
clock, since now() will otherwise hit an assert.

Specifically, let's refuse CLOCK_BOOTTIME early in sd-event if the kernel
doesn't actually support it.

This is a follow-up for #3037, and specifically:

https://github.com/systemd/systemd/pull/3037#issuecomment-210199167
src/basic/time-util.c
src/basic/time-util.h
src/core/timer.c
src/libsystemd/sd-event/sd-event.c
src/libsystemd/sd-event/test-event.c