sg: don't return success if non bdev/char is used
authorJens Axboe <axboe@fb.com>
Tue, 31 Mar 2015 19:40:25 +0000 (13:40 -0600)
committerJens Axboe <axboe@fb.com>
Tue, 31 Mar 2015 19:41:18 +0000 (13:41 -0600)
Signed-off-by: Jens Axboe <axboe@fb.com>
engines/sg.c

index 6272b79b568242239ae93cd028e919029b83c7b7..8acbd50adbe0ccecb98c886ed718aa74941870a8 100644 (file)
@@ -368,6 +368,7 @@ static int fio_sgio_type_check(struct thread_data *td, struct fio_file *f)
                if (ret)
                        return 1;
        } else {
+               td_verror(td, EINVAL, "wrong file type");
                log_err("ioengine sg only works on block devices\n");
                return 1;
        }