file: fio_files_done() can return bool
authorJens Axboe <axboe@fb.com>
Fri, 26 Aug 2016 14:34:41 +0000 (08:34 -0600)
committerJens Axboe <axboe@fb.com>
Fri, 26 Aug 2016 14:34:41 +0000 (08:34 -0600)
Signed-off-by: Jens Axboe <axboe@fb.com>
file.h
filesetup.c

diff --git a/file.h b/file.h
index aff3ce9f301dcf004473af965d6c84cdba993ed3..6f34dd5c3d315608778f638e6be45ef7f4726cd1 100644 (file)
--- a/file.h
+++ b/file.h
@@ -210,7 +210,7 @@ extern int get_fileno(struct thread_data *, const char *);
 extern void free_release_files(struct thread_data *);
 extern void filesetup_mem_free(void);
 extern void fio_file_reset(struct thread_data *, struct fio_file *);
-extern int fio_files_done(struct thread_data *);
+extern bool fio_files_done(struct thread_data *);
 extern bool exists_and_not_regfile(const char *);
 
 #endif
index fc9f3067226ee48276071af7343659a939cef43e..c6ef3bf2744f52a70e8bf845a65d4877ed7e8e4b 100644 (file)
@@ -1292,7 +1292,6 @@ static void set_already_allocated(const char *fname)
        }
 }
 
-
 static void free_already_allocated(void)
 {
        struct flist_head *entry, *tmp;
@@ -1666,16 +1665,16 @@ void fio_file_reset(struct thread_data *td, struct fio_file *f)
                lfsr_reset(&f->lfsr, td->rand_seeds[FIO_RAND_BLOCK_OFF]);
 }
 
-int fio_files_done(struct thread_data *td)
+bool fio_files_done(struct thread_data *td)
 {
        struct fio_file *f;
        unsigned int i;
 
        for_each_file(td, f, i)
                if (!fio_file_done(f))
-                       return 0;
+                       return false;
 
-       return 1;
+       return true;
 }
 
 /* free memory used in initialization phase only */