libreport/0008-create-last_occurrence-at-the-time-of-the-first-cras.patch

33 lines
966 B
Diff

From d975b074727f42e67a2c27a72a87d623da926c15 Mon Sep 17 00:00:00 2001
From: Jiri Moskovcak <jmoskovc@redhat.com>
Date: Mon, 6 May 2013 14:55:24 +0200
Subject: [LIBREPORT PATCH 8/8] create last_occurrence at the time of the first
crash
- closes #161
Signed-off-by: Jiri Moskovcak <jmoskovc@redhat.com>
Signed-off-by: Richard Marko <rmarko@fedoraproject.org>
---
src/lib/dump_dir.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/lib/dump_dir.c b/src/lib/dump_dir.c
index a8e9a77..360536f 100644
--- a/src/lib/dump_dir.c
+++ b/src/lib/dump_dir.c
@@ -612,7 +612,10 @@ void dd_create_basic_files(struct dump_dir *dd, uid_t uid, const char *chroot_di
{
time_t t = time(NULL);
sprintf(long_str, "%lu", (long)t);
+ /* first occurrence */
dd_save_text(dd, FILENAME_TIME, long_str);
+ /* last occurrence */
+ dd_save_text(dd, FILENAME_LAST_OCCURRENCE, long_str);
}
free(time_str);
--
1.8.1.4