Dump actual filename in failure to open
[fio.git] / filesetup.c
index 289db8781d82535e5929db7cbc8f7bd45329920d..daae33ff47e36e2357082721f26c93ea82e7ef9d 100644 (file)
@@ -384,9 +384,12 @@ int generic_open_file(struct thread_data *td, struct fio_file *f)
        }
 
        if (f->fd == -1) {
+               char buf[FIO_VERROR_SIZE];
                int __e = errno;
 
-               td_verror(td, __e, "open");
+               snprintf(buf, sizeof(buf) - 1, "open(%s)", f->file_name);
+
+               td_verror(td, __e, buf);
                if (__e == EINVAL && td->o.odirect)
                        log_err("fio: destination does not support O_DIRECT\n");
                if (__e == EMFILE)