From 4df2423a947bcd3f024cc3d3a1a315a8dc428598 Mon Sep 17 00:00:00 2001 From: The Android Open Source Project Date: Thu, 5 Mar 2009 14:34:35 -0800 Subject: auto import from //depot/cupcake/@136594 --- cmds/dumpstate/dumpstate.c | 5 ++++- cmds/dumpstate/dumpstate.h | 9 +++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) (limited to 'cmds/dumpstate') diff --git a/cmds/dumpstate/dumpstate.c b/cmds/dumpstate/dumpstate.c index e08230f..5ef7499 100644 --- a/cmds/dumpstate/dumpstate.c +++ b/cmds/dumpstate/dumpstate.c @@ -127,7 +127,10 @@ static void dumpstate(int full) { PRINT("========================================================"); PRINT("== dumpsys"); PRINT("========================================================"); - EXEC("dumpsys"); + /* the full dumpsys is starting to take a long time, so we need + to increase its timeout. we really need to do the timeouts in + dumpsys itself... */ + EXEC_TIMEOUT("dumpsys", 40); } } diff --git a/cmds/dumpstate/dumpstate.h b/cmds/dumpstate/dumpstate.h index 4e88e4b..33127fb 100644 --- a/cmds/dumpstate/dumpstate.h +++ b/cmds/dumpstate/dumpstate.h @@ -43,6 +43,15 @@ run_command(&c, TIMEOUT); \ } +#define EXEC_TIMEOUT(cmd, tmout)\ +{ \ + static struct Command c = { \ + "/system/bin/" cmd, \ + { cmd, 0 } \ + }; \ + run_command(&c, tmout); \ +} + #define EXEC_XBIN(cmd) \ { \ static struct Command c = { \ -- cgit v1.1