[PATCH 7/9] Don't prepend blktrace destination dir if we didn't run blktrace

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxx>
---
 iowatcher/main.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/iowatcher/main.c b/iowatcher/main.c
index 28ff4cbbb153..2d0349c083b7 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)
-- 
2.6.6

--
To unsubscribe from this list: send the line "unsubscribe linux-block" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux