X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=engines%2Ffio-engine-sg.c;h=fafc326968df8019f7485880732d13cbc7484b84;hp=112f027869a840aebe43bc2f16c5e0a9a75873f5;hb=34cfcdafa994a0a75120e498c51eda08bde5df72;hpb=c06aa240c904becbafb8457ed3b828cf0d38a180 diff --git a/engines/fio-engine-sg.c b/engines/fio-engine-sg.c index 112f0278..fafc3269 100644 --- a/engines/fio-engine-sg.c +++ b/engines/fio-engine-sg.c @@ -11,6 +11,8 @@ #include "fio.h" #include "os.h" +#ifdef FIO_HAVE_SGIO + struct sgio_cmd { unsigned char cdb[10]; int nr; @@ -314,3 +316,24 @@ struct ioengine_ops ioengine = { .cleanup = fio_sgio_cleanup, .flags = FIO_SYNCIO | FIO_RAWIO, }; + +#else /* FIO_HAVE_SGIO */ + +/* + * When we have a proper configure system in place, we simply wont build + * and install this io engine. For now install a crippled version that + * just complains and fails to load. + */ +static int fio_sgio_init(struct thread_data fio_unused *td) +{ + fprintf(stderr, "fio: sgio not available\n"); + return 1; +} + +struct ioengine_ops ioengine = { + .name = "sgio", + .version = FIO_IOOPS_VERSION, + .init = fio_sgio_init, +}; + +#endif