Dump actual filename in failure to open
Helpful for debugging.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
diff --git a/filesetup.c b/filesetup.c
index 289db87..daae33f 100644
--- a/filesetup.c
+++ b/filesetup.c
@@ -384,9 +384,12 @@
}
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)