From a4eb91da03bd785bc91bed0d25a9efaa9baba1c1 Mon Sep 17 00:00:00 2001 From: San Mehat Date: Sat, 5 Sep 2009 15:20:20 -0700 Subject: dumpstate: Add the ctime (time the file was harvested out of /proc) to dump. Signed-off-by: San Mehat --- cmds/dumpstate/dumpstate.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'cmds/dumpstate') diff --git a/cmds/dumpstate/dumpstate.c b/cmds/dumpstate/dumpstate.c index 6a00e3e..c211b47 100644 --- a/cmds/dumpstate/dumpstate.c +++ b/cmds/dumpstate/dumpstate.c @@ -333,10 +333,18 @@ int main(int argc, char *argv[]) { static void dump_kernel_log(const char *path, const char *title) { - printf("------ KERNEL %s LOG ------\n", title); - if (access(path, R_OK) < 0) - printf("%s: %s\n", path, strerror(errno)); - else - DUMP(path); + printf("------ KERNEL %s LOG ------\n", title); + if (access(path, R_OK) < 0) + printf("%s: %s\n", path, strerror(errno)); + else { + struct stat sbuf; + + if (stat(path, &sbuf) < 0) + printf("%s: stat failed (%s)\n", path, strerror(errno)); + else + printf("Harvested %s", ctime(&sbuf.st_ctime)); + + DUMP(path); + } } -- cgit v1.1