trace-cmd: Fix multi buffers for stop, reset, and restart

If more than one -B is specified and -t is not, one of the instances
is skipped. Rewrite the code to process what list of buffers is needed
after the command line has been parsed.

Reported-by: Andy Martin from Lexmark, Inc.
[ Howard added checking if buffer_instance exists in update_first_instance() ]
Signed-off-by: Howard Cochran <hcochran@kernelspring.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
1 file changed