diff options
| author | 2016-02-22 11:06:49 -0800 | |
|---|---|---|
| committer | 2016-02-22 11:10:37 -0800 | |
| commit | 88c7933df551f6dadd8cc931d104b01d6d1609e4 (patch) | |
| tree | f3f21f0721adef9d5bb40eeb84b037bf7890da1b /cmds/dumpstate/utils.cpp | |
| parent | 085e02ec76788474029a1b4e0d7c02bbbb482499 (diff) | |
Improved dumpstate logging.
BUG: 26906985
Change-Id: Id439560504a365961337fddcca4ba6c1ef9f377d
Diffstat (limited to 'cmds/dumpstate/utils.cpp')
| -rw-r--r-- | cmds/dumpstate/utils.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/cmds/dumpstate/utils.cpp b/cmds/dumpstate/utils.cpp index 282a772d53..f0ae325457 100644 --- a/cmds/dumpstate/utils.cpp +++ b/cmds/dumpstate/utils.cpp @@ -713,6 +713,7 @@ void send_broadcast(const std::string& action, const std::vector<std::string>& a } // Always terminate with NULL. am_args[am_index + 1] = NULL; + log_args("send_broadcast arguments", am_index, am_args); run_command_always(NULL, 5, am_args); } @@ -1187,3 +1188,12 @@ void dump_emmc_ecsd(const char *ext_csd_path) { printf("\n"); } + +void log_args(const std::string& message, int argc, const char *argv[]) { + std::string args; + for (int i = 0; i < argc; i++) { + args.append(argv[i]); + args.append(" "); + } + MYLOGI("%s: %s\n", message.c_str(), args.c_str()); +} |