From: Jens Axboe Date: Mon, 26 May 2008 12:53:24 +0000 (+0200) Subject: Remove early directory check X-Git-Tag: fio-1.21-rc1~4 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=fcef0b35e58d0d676b1560d563b518212f84e78b Remove early directory check It wont work on FIO_DISKLESSIO engines and the engine isn't loaded at this point so we cannot check. For now just disable the check. Signed-off-by: Jens Axboe --- diff --git a/options.c b/options.c index ba57e446..51914af4 100644 --- a/options.c +++ b/options.c @@ -273,17 +273,24 @@ static int str_fst_cb(void *data, const char *str) static int check_dir(struct thread_data *td, char *fname) { char file[PATH_MAX], *dir; - struct stat sb; int elen = 0; if (td->o.directory) { strcpy(file, td->o.directory); + strcat(file, "/"); elen = strlen(file); } - sprintf(file + elen, "/%s", fname); + sprintf(file + elen, "%s", fname); dir = dirname(file); +#if 0 + { + struct stat sb; + /* + * We can't do this on FIO_DISKLESSIO engines. The engine isn't loaded + * yet, so we can't do this check right here... + */ if (lstat(dir, &sb) < 0) { int ret = errno; @@ -296,6 +303,8 @@ static int check_dir(struct thread_data *td, char *fname) log_err("fio: %s is not a directory\n", dir); return 1; } + } +#endif return 0; }