[systemd-devel] [PATCH] manager: only serialize the timestamps for the initramfs if in_initrd()

harald at redhat.com harald at redhat.com
Wed May 16 05:22:41 PDT 2012


From: Harald Hoyer <harald at redhat.com>

---
 src/core/manager.c |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/core/manager.c b/src/core/manager.c
index bd86f89..a627081 100644
--- a/src/core/manager.c
+++ b/src/core/manager.c
@@ -1733,8 +1733,11 @@ int manager_serialize(Manager *m, FILE *f, FDSet *fds) {
         fprintf(f, "taint-usr=%s\n", yes_no(m->taint_usr));
 
         dual_timestamp_serialize(f, "initrd-timestamp", &m->initrd_timestamp);
-        dual_timestamp_serialize(f, "startup-timestamp", &m->startup_timestamp);
-        dual_timestamp_serialize(f, "finish-timestamp", &m->finish_timestamp);
+
+        if (! in_initrd()) {
+                dual_timestamp_serialize(f, "startup-timestamp", &m->startup_timestamp);
+                dual_timestamp_serialize(f, "finish-timestamp", &m->finish_timestamp);
+        }
 
         fputc('\n', f);
 
-- 
1.7.10.1



More information about the systemd-devel mailing list