From: Erwan Velu Date: Wed, 2 Apr 2014 08:00:56 +0000 (+0200) Subject: iolog: Keep full path for logs files X-Git-Tag: fio-2.1.8~26^2 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=e53cf97beb6c07ea1dedc218058675cc291e9f2a;ds=sidebyside iolog: Keep full path for logs files The default behavior of fio was to basename() the log filename preventing relocating it into another directory. This patch simply removes the basename() that doesn't provides any real feature but only limit the usage. Patch tested with genfio with success while relocating to /tmp. --- diff --git a/iolog.c b/iolog.c index b8ee067f..7cb633b6 100644 --- a/iolog.c +++ b/iolog.c @@ -541,17 +541,16 @@ void __finish_log(struct io_log *log, const char *name) void finish_log_named(struct thread_data *td, struct io_log *log, const char *prefix, const char *postfix) { - char file_name[256], *p; + char file_name[256]; snprintf(file_name, sizeof(file_name), "%s_%s.log", prefix, postfix); - p = basename(file_name); if (td->client_type == FIO_CLIENT_TYPE_GUI) { - fio_send_iolog(td, log, p); + fio_send_iolog(td, log, file_name); free(log->log); free(log); } else - __finish_log(log, p); + __finish_log(log, file_name); } void finish_log(struct thread_data *td, struct io_log *log, const char *name)