When user specifies trace files directly via -t option, it doesn't make
sense to prepend blktrace destination directory to them (it is
especially confusing if you specify absolute path names with -t option
and this logic breaks the path names). So avoid that.
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Jens Axboe <axboe@fb.com>
char *path = NULL;
list_for_each_entry(tf, &all_traces, list) {
- path = join_path(blktrace_dest_dir, tf->filename);
+ if (num_blktrace_devices)
+ path = join_path(blktrace_dest_dir, tf->filename);
+ else
+ path = strdup(tf->filename);
trace = open_trace(path);
if (!trace)