summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2016-05-05 17:17:10 +0200
committerJens Axboe <axboe@fb.com>2016-05-05 09:20:18 -0600
commit8a544092665186e483d55c57adc66d033dbb3bd3 (patch)
tree0f57508b2ede20dd37eea555c4dea7a19853d418
parentca215e985fadd8de53605ece5d31f924e0f8fde0 (diff)
downloadblktrace-8a544092665186e483d55c57adc66d033dbb3bd3.tar.gz
blktrace-8a544092665186e483d55c57adc66d033dbb3bd3.tar.bz2
Don't prepend blktrace destination dir if we didn't run blktrace
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>
-rw-r--r--iowatcher/main.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/iowatcher/main.c b/iowatcher/main.c
index 28ff4cb..2d0349c 100644
--- a/iowatcher/main.c
+++ b/iowatcher/main.c
@@ -328,7 +328,10 @@ static void read_traces(void)
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)