if (!td->o.write_iolog_file)
return;
+
+ /*
+ * this happens on the pre-open/close done before the job starts
+ */
+ if (!td->iolog_f)
+ return;
+
fprintf(td->iolog_f, "%s %s\n", f->file_name, act[what]);
}
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);
}