Put the logs in the current directory
authorJens Axboe <jens.axboe@oracle.com>
Wed, 7 May 2008 12:28:22 +0000 (14:28 +0200)
committerJens Axboe <jens.axboe@oracle.com>
Wed, 7 May 2008 12:28:22 +0000 (14:28 +0200)
It's nice to prefix the log with the proper job name, but that
meant that it would store them in weird places if you used /dev/sda
for the input device, for instance.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
log.c

diff --git a/log.c b/log.c
index 15de3c24d10bf64698325479af7e5b45f80c81aa..790d3a1e32c9d4c046bb17be0f10f44a74f5fef3 100644 (file)
--- a/log.c
+++ b/log.c
@@ -465,8 +465,9 @@ void __finish_log(struct io_log *log, const char *name)
 
 void finish_log(struct thread_data *td, struct io_log *log, const char *name)
 {
-       char file_name[256];
+       char file_name[256], *p;
 
        snprintf(file_name, 200, "%s_%s.log", td->o.name, name);
-       __finish_log(log, file_name);
+       p = basename(file_name);
+       __finish_log(log, p);
 }