- int ret;
-
- if (io_u->ddir == DDIR_SYNC) {
- ret = fsync(io_u->file->fd);
- } else if (io_u->ddir == DDIR_DATASYNC) {
-#ifdef FIO_HAVE_FDATASYNC
- ret = fdatasync(io_u->file->fd);
-#else
- ret = io_u->xfer_buflen;
- io_u->error = EINVAL;
-#endif
- } else if (io_u->ddir == DDIR_SYNC_FILE_RANGE)
- ret = do_sync_file_range(td, io_u->file);
- else {
- ret = io_u->xfer_buflen;
- io_u->error = EINVAL;
+ struct flist_head *entry;
+ struct thread_data td;
+ struct ioengine_ops *io_ops;
+ char *sep;
+ int ret = 1;
+
+ if (!engine || !*engine) {
+ log_info("Available IO engines:\n");
+ flist_for_each(entry, &engine_list) {
+ io_ops = flist_entry(entry, struct ioengine_ops, list);
+ log_info("\t%s\n", io_ops->name);
+ }
+ return 0;
+ }
+ sep = strchr(engine, ',');
+ if (sep) {
+ *sep = 0;
+ sep++;