Skip to contentSkip to conversation

perf tools: Remove die() call

tip:perf/core tip-bot for Arnaldo Carvalho de Melo 1 participant 1 message Apr 5, 2017 perf events

lore
Share & tools
lore
#0 lore raw
Commit-ID:  427748068a973627b406bf7312342b6fe4742d07
Gitweb:     http://git.kernel.org/tip/427748068a973627b406bf7312342b6fe4742d07
Author:     Arnaldo Carvalho de Melo <[email protected]>
AuthorDate: Tue, 4 Apr 2017 11:36:22 -0300
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Tue, 4 Apr 2017 11:36:22 -0300

perf tools: Remove die() call

We can just use the exit() right after the branch calling die().

---
 tools/perf/perf.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
tools/perf/perf.c +2 -1
index 9217f22..9dc346f 100644
@@ -378,7 +378,8 @@ static void execv_dashed_external(const char **argv)
 	if (status != -ERR_RUN_COMMAND_EXEC) {
 		if (IS_RUN_COMMAND_ERR(status)) {
 do_die:
-			die("unable to run '%s'", argv[0]);
+			pr_err("FATAL: unable to run '%s'", argv[0]);
+			status = -128;
 		}
 		exit(-status);
 	}