The following changes since commit bb7816439c44f6f98debd8afd167da14d612574c: client: bool conversion (2016-04-13 15:53:06 -0600) are available in the git repository at: git://git.kernel.dk/fio.git master for you to fetch changes up to 49a416bd60825b3e42d02e46ccf495909747c16e: filesetup: assign fileno at setup time (2016-04-14 08:57:46 -0600) ---------------------------------------------------------------- Jens Axboe (2): t/fio-verify-state: allow multiple input files filesetup: assign fileno at setup time filesetup.c | 1 + t/verify-state.c | 34 ++++++++++++++++++++++++---------- 2 files changed, 25 insertions(+), 10 deletions(-) --- Diff of recent changes: diff --git a/filesetup.c b/filesetup.c index a821632..3fc1464 100644 --- a/filesetup.c +++ b/filesetup.c @@ -809,6 +809,7 @@ int setup_files(struct thread_data *td) */ total_size = 0; for_each_file(td, f, i) { + f->fileno = i; if (f->real_file_size == -1ULL) total_size = -1ULL; else diff --git a/t/verify-state.c b/t/verify-state.c index 95dcf3a..d744e6f 100644 --- a/t/verify-state.c +++ b/t/verify-state.c @@ -93,22 +93,15 @@ static void show_verify_state(void *buf, size_t size) log_err("Unsupported version %d\n", (int) hdr->version); } -int main(int argc, char *argv[]) +static int show_file(const char *file) { struct stat sb; void *buf; int ret, fd; - debug_init(); - - if (argc < 2) { - log_err("Usage: %s <state file>\n", argv[0]); - return 1; - } - - fd = open(argv[1], O_RDONLY); + fd = open(file, O_RDONLY); if (fd < 0) { - log_err("open %s: %s\n", argv[1], strerror(errno)); + log_err("open %s: %s\n", file, strerror(errno)); return 1; } @@ -136,3 +129,24 @@ int main(int argc, char *argv[]) free(buf); return 0; } + +int main(int argc, char *argv[]) +{ + int i, ret; + + debug_init(); + + if (argc < 2) { + log_err("Usage: %s <state file>\n", argv[0]); + return 1; + } + + ret = 0; + for (i = 1; i < argc; i++) { + ret = show_file(argv[i]); + if (ret) + break; + } + + return ret; +} -- To unsubscribe from this list: send the line "unsubscribe fio" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html