From a34efb7ae17a7ea1078cce75be634120bd72a421 Mon Sep 17 00:00:00 2001 From: Felipe Leme Date: Fri, 11 Mar 2016 09:33:32 -0800 Subject: Improve logging of child commands. When execvpe() is called it doesn't return, so the child error handling should be done at the parent, otherwise the failure is not printed in the bugreport. BUG: 27583193 Change-Id: I6161e4c72b7b0da7b82bff7fd72d7a5aaf4d6e89 --- cmds/dumpstate/dumpstate.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'cmds/dumpstate/dumpstate.cpp') diff --git a/cmds/dumpstate/dumpstate.cpp b/cmds/dumpstate/dumpstate.cpp index 458ed3e525..d7e5f171c6 100644 --- a/cmds/dumpstate/dumpstate.cpp +++ b/cmds/dumpstate/dumpstate.cpp @@ -1058,7 +1058,9 @@ int main(int argc, char *argv[]) { } /* parse arguments */ - log_args("Dumpstate command line", argc, const_cast(argv)); + std::string args; + format_args(argc, const_cast(argv), &args); + MYLOGD("Dumpstate command line: %s\n", args.c_str()); int c; while ((c = getopt(argc, argv, "dho:svqzpPBRV:")) != -1) { switch (c) { -- cgit v1.2.3-59-g8ed1b