X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Fcore%2Fmanager.c;h=aaf66970cf11e7a6e94d83fdd2919ad9ee01aaec;hp=df0fd63e87171add3dbb6fa6b6498bb90a9660f2;hb=2e3d069236777cd62f755a02f4a239306b4ad21a;hpb=cae0c5e042c04b33b93a6a9af355f7304f75a45c diff --git a/src/core/manager.c b/src/core/manager.c index df0fd63e8..aaf66970c 100644 --- a/src/core/manager.c +++ b/src/core/manager.c @@ -70,6 +70,7 @@ #include "cgroup-util.h" #include "path-util.h" #include "audit-fd.h" +#include "efivars.h" /* As soon as 16 units are in our GC queue, make sure to run a gc sweep */ #define GC_QUEUE_ENTRIES_MAX 16 @@ -157,8 +158,8 @@ static int manager_setup_time_change(Manager *m) { /* We only care for the cancellation event, hence we set the * timeout to the latest possible value. */ - assert_cc(sizeof(time_t) == sizeof(long)); - its.it_value.tv_sec = LONG_MAX; + assert_cc(sizeof(time_t) == sizeof(TIME_T_MAX)); + its.it_value.tv_sec = TIME_T_MAX; if (timerfd_settime(m->time_change_watch.fd, TFD_TIMER_ABSTIME|TFD_TIMER_CANCEL_ON_SET, &its, NULL) < 0) { log_debug("Failed to set up TFD_TIMER_CANCEL_ON_SET, ignoring: %m"); @@ -302,6 +303,7 @@ int manager_new(SystemdRunningAs running_as, Manager **_m) { dual_timestamp_get(&m->userspace_timestamp); dual_timestamp_from_monotonic(&m->kernel_timestamp, 0); + efi_get_boot_timestamps(&m->userspace_timestamp, &m->firmware_timestamp, &m->loader_timestamp); m->running_as = running_as; m->name_data_slot = m->conn_data_slot = m->subscribed_data_slot = -1;