chiark / gitweb /
core: do not read system boot timestamps in systemd --user mode
authorKay Sievers <kay@vrfy.org>
Wed, 26 Mar 2014 02:47:03 +0000 (03:47 +0100)
committerKay Sievers <kay@vrfy.org>
Wed, 26 Mar 2014 02:47:03 +0000 (03:47 +0100)
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

src/core/manager.c

index 224106c..ce8759e 100644 (file)
@@ -422,7 +422,7 @@ int manager_new(SystemdRunningAs running_as, Manager **_m) {
                 return -ENOMEM;
 
 #ifdef ENABLE_EFI
                 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
 
                 boot_timestamps(&m->userspace_timestamp, &m->firmware_timestamp, &m->loader_timestamp);
 #endif