core: do not read system boot timestamps in systemd --user mode

Before:
  $ systemd-analyze --user
  Startup finished in 2.810s (firmware) + 48ms (loader) + 122ms (userspace) = 122ms

After:
  $ systemd-analyze --user
  Startup finished in 122ms (userspace) = 122ms
This commit is contained in:
Kay Sievers 2014-03-26 03:47:03 +01:00
parent 4851ac4526
commit 530a9662aa
1 changed files with 1 additions and 1 deletions

View File

@ -422,7 +422,7 @@ int manager_new(SystemdRunningAs running_as, Manager **_m) {
return -ENOMEM;
#ifdef ENABLE_EFI
if (detect_container(NULL) <= 0)
if (running_as == SYSTEMD_SYSTEM && detect_container(NULL) <= 0)
boot_timestamps(&m->userspace_timestamp, &m->firmware_timestamp, &m->loader_timestamp);
#endif