projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
nr_files conflict with filename
[fio.git]
/
init.c
diff --git
a/init.c
b/init.c
index a3d1d5a87e9fe1c0b7d87d2e0b49a0a744989f53..1cb384570200d5d575201de47da48b1bc08ef92b 100644
(file)
--- a/
init.c
+++ b/
init.c
@@
-753,8
+753,11
@@
static void fixup_options(struct thread_data *td)
td->iodepth_batch = td->iodepth;
if (!td->nr_files)
td->iodepth_batch = td->iodepth;
if (!td->nr_files)
- td->nr_files = td->open_files;
- else if (td->open_files > td->nr_files || !td->open_files)
+ td->nr_files = td->files_index;
+ else if (td->nr_files > td->files_index)
+ td->nr_files = td->files_index;
+
+ if (td->open_files > td->nr_files || !td->open_files)
td->open_files = td->nr_files;
}
td->open_files = td->nr_files;
}
@@
-1106,9
+1109,6
@@
static int str_filename_cb(void *data, const char *input)
struct thread_data *td = data;
char *fname, *str, *p;
struct thread_data *td = data;
char *fname, *str, *p;
- if (!td->filename)
- td->nr_files = 0;
-
p = str = strdup(input);
strip_blank_front(&str);
p = str = strdup(input);
strip_blank_front(&str);
@@
-1118,7
+1118,6
@@
static int str_filename_cb(void *data, const char *input)
if (!strlen(fname))
break;
add_file(td, fname);
if (!strlen(fname))
break;
add_file(td, fname);
- td->nr_files++;
}
free(p);
}
free(p);