summaryrefslogtreecommitdiffstats
path: root/cmds
diff options
context:
space:
mode:
authorSan Mehat <san@google.com>2009-09-05 15:20:20 -0700
committerSan Mehat <san@google.com>2009-09-05 15:20:20 -0700
commita4eb91da03bd785bc91bed0d25a9efaa9baba1c1 (patch)
tree526264efd6183ba5799cc514532812db3c7961b9 /cmds
parent0b98c944c6bac98d95c93916cde31f841b44d9aa (diff)
downloadframeworks_base-a4eb91da03bd785bc91bed0d25a9efaa9baba1c1.zip
frameworks_base-a4eb91da03bd785bc91bed0d25a9efaa9baba1c1.tar.gz
frameworks_base-a4eb91da03bd785bc91bed0d25a9efaa9baba1c1.tar.bz2
dumpstate: Add the ctime (time the file was harvested out of /proc) to dump.
Signed-off-by: San Mehat <san@google.com>
Diffstat (limited to 'cmds')
-rw-r--r--cmds/dumpstate/dumpstate.c18
1 files changed, 13 insertions, 5 deletions
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);
+ }
}