td->loops = 1;
if (td->o.block_error_hist && td->o.nr_files != 1) {
- log_err("fio: block error histogram only available with "
+ log_err("fio: block error histogram only available "
"with a single file per job, but %d files "
"provided\n", td->o.nr_files);
ret = 1;
return p;
}
-static int exists_and_not_file(const char *filename)
+static int exists_and_not_regfile(const char *filename)
{
struct stat sb;
if (lstat(filename, &sb) == -1)
return 0;
+#ifndef WIN32 /* NOT Windows */
+ if (S_ISREG(sb.st_mode))
+ return 0;
+#else
/* \\.\ is the device namespace in Windows, where every file
* is a device node */
if (S_ISREG(sb.st_mode) && strncmp(filename, "\\\\.\\", 4) != 0)
return 0;
+#endif
return 1;
}
if (!o->filename && !td->files_index && !o->read_iolog_file) {
file_alloced = 1;
- if (o->nr_files == 1 && exists_and_not_file(jobname))
+ if (o->nr_files == 1 && exists_and_not_regfile(jobname))
add_file(td, jobname, job_add_num, 0);
else {
for (i = 0; i < o->nr_files; i++)