X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=init.c;h=bc17b40213a5bacdcecae2ca89e937ef86d6c8b8;hp=a1a008797d4a9eead366f304388e665eeb98a4ca;hb=34fbdab48d2399e8d11a6f40353ba00d2edf9151;hpb=9b87f09b1d3cac320c2da5758c1e74d4b4c0fadd diff --git a/init.c b/init.c index a1a00879..bc17b402 100644 --- a/init.c +++ b/init.c @@ -47,7 +47,6 @@ static char **job_sections; static int nr_job_sections; int exitall_on_terminate = 0; -int exitall_on_terminate_error = 0; int output_format = FIO_OUTPUT_NORMAL; int eta_print = FIO_ETA_AUTO; int eta_new_line = 0; @@ -310,7 +309,7 @@ static void free_shm(void) free(trigger_remote_cmd); trigger_file = trigger_cmd = trigger_remote_cmd = NULL; - options_free(fio_options, &def_thread); + options_free(fio_options, &def_thread.o); fio_filelock_exit(); scleanup(); } @@ -904,26 +903,6 @@ static const char *get_engine_name(const char *str) return p; } -static int exists_and_not_regfile(const char *filename) -{ - struct stat sb; - - if (lstat(filename, &sb) == -1) - return 0; - -#ifndef WIN32 /* NOT Windows */ - if (S_ISREG(sb.st_mode)) - return 0; -#else - /* \\.\ is the device namespace in Windows, where every file - * is a device node */ - if (S_ISREG(sb.st_mode) && strncmp(filename, "\\\\.\\", 4) != 0) - return 0; -#endif - - return 1; -} - static void init_rand_file_service(struct thread_data *td) { unsigned long nranges = td->o.nr_files << FIO_FSERVICE_SHIFT; @@ -1248,7 +1227,7 @@ static char *make_filename(char *buf, size_t buf_size,struct thread_options *o, return buf; } -int parse_dryrun(void) +bool parse_dryrun(void) { return dump_cmdline || parse_only; } @@ -1447,6 +1426,12 @@ static int add_job(struct thread_data *td, const char *jobname, int job_add_num, } if (o->hist_log_file) { +#ifndef CONFIG_ZLIB + if (td->client_type) { + log_err("fio: --write_hist_log requires zlib in client/server mode\n"); + goto err; + } +#endif struct log_params p = { .td = td, .avg_msec = o->log_avg_msec,