aboutsummaryrefslogtreecommitdiffstats
path: root/trace-cmd.c
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2010-02-24 14:59:57 -0500
committerSteven Rostedt <rostedt@goodmis.org>2010-02-24 16:21:52 -0500
commit7716e2e0d6d855e34ead9c0de271c6eed5458a65 (patch)
tree285c0866ab1f5e057f5890fd847d28ff45c561a7 /trace-cmd.c
parent4aea09d6e4cc3236a03b3d6a3bceecae3b609513 (diff)
trace-cmd: Stop recording if the recorder fails
Add a check to the recorder to see if it failed. If it did, stop processing. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'trace-cmd.c')
-rw-r--r--trace-cmd.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/trace-cmd.c b/trace-cmd.c
index cdd78f4..3476320 100644
--- a/trace-cmd.c
+++ b/trace-cmd.c
@@ -965,8 +965,10 @@ static int create_recorder(int cpu)
965 965
966 if (!recorder) 966 if (!recorder)
967 die ("can't create recorder"); 967 die ("can't create recorder");
968 while (!finished) 968 while (!finished) {
969 tracecmd_start_recording(recorder, sleep_time); 969 if (tracecmd_start_recording(recorder, sleep_time) < 0)
970 break;
971 }
970 tracecmd_free_recorder(recorder); 972 tracecmd_free_recorder(recorder);
971 973
972 exit(0); 974 exit(0);