void finish_log_named(struct thread_data *td, struct io_log *log, const char *prefix, const char *postfix) { char file_name[256], *p; snprintf(file_name, 200, "%s_%s.log", prefix, postfix); p = basename(file_name); __finish_log(log, p); }
void finish_log_named(struct thread_data *td, struct io_log *log, const char *prefix, const char *postfix) { char file_name[256], *p; 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); free(log->log); free(log); } else __finish_log(log, p); }
static int finish_log_named(struct thread_data *td, struct io_log *log, const char *prefix, const char *postfix, int trylock) { char file_name[256]; snprintf(file_name, sizeof(file_name), "%s_%s.log", prefix, postfix); if (trylock) { if (fio_trylock_file(file_name)) return 1; } else fio_lock_file(file_name); if (td->client_type == FIO_CLIENT_TYPE_GUI) { fio_send_iolog(td, log, file_name); free(log->log); free(log); } else __finish_log(log, file_name); fio_unlock_file(file_name); return 0; }