From: Jens Axboe Date: Thu, 2 Nov 2017 15:06:14 +0000 (-0600) Subject: filesetup: create_work_dirs() can return bool X-Git-Tag: fio-3.2~8 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=0a93fb3e08bf8957b782b80b4d5487852f0c81ce;p=fio.git filesetup: create_work_dirs() can return bool Signed-off-by: Jens Axboe --- diff --git a/filesetup.c b/filesetup.c index 1efffa8f..1c36ff8f 100644 --- a/filesetup.c +++ b/filesetup.c @@ -1516,7 +1516,7 @@ bool exists_and_not_regfile(const char *filename) return true; } -static int create_work_dirs(struct thread_data *td, const char *fname) +static bool create_work_dirs(struct thread_data *td, const char *fname) { char path[PATH_MAX]; char *start, *end; @@ -1543,13 +1543,13 @@ static int create_work_dirs(struct thread_data *td, const char *fname) #endif log_err("fio: failed to create dir (%s): %d\n", start, errno); - return 1; + return false; } *end = FIO_OS_PATH_SEPARATOR; end++; } td->flags |= TD_F_DIRS_CREATED; - return 0; + return true; } int add_file(struct thread_data *td, const char *fname, int numjob, int inc) @@ -1569,7 +1569,7 @@ int add_file(struct thread_data *td, const char *fname, int numjob, int inc) if (strchr(fname, FIO_OS_PATH_SEPARATOR) && !(td->flags & TD_F_DIRS_CREATED) && - create_work_dirs(td, fname)) + !create_work_dirs(td, fname)) return 1; /* clean cloned siblings using existing files */