X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=engines%2Ffio-engine-sg.c;h=9c5037f5d11fb0391cc25eda994a44366e3297ce;hp=2762e0bac3b25783f02ccdf6366327eb42d98583;hb=5f350952eff89948bfbf1eb6ac4d3d08a9109581;hpb=be67e2de7961e849d5ad82e8c9206377c325b7c8;ds=sidebyside diff --git a/engines/fio-engine-sg.c b/engines/fio-engine-sg.c index 2762e0ba..9c5037f5 100644 --- a/engines/fio-engine-sg.c +++ b/engines/fio-engine-sg.c @@ -8,8 +8,9 @@ #include #include #include -#include "fio.h" -#include "os.h" + +#include "../fio.h" +#include "../os.h" #ifdef FIO_HAVE_SGIO @@ -313,7 +314,7 @@ err: return 1; } -struct ioengine_ops ioengine = { +static struct ioengine_ops ioengine = { .name = "sg", .version = FIO_IOOPS_VERSION, .init = fio_sgio_init, @@ -338,10 +339,20 @@ static int fio_sgio_init(struct thread_data fio_unused *td) return 1; } -struct ioengine_ops ioengine = { +static struct ioengine_ops ioengine = { .name = "sgio", .version = FIO_IOOPS_VERSION, .init = fio_sgio_init, }; #endif + +static void fio_init fio_sgio_register(void) +{ + register_ioengine(&ioengine); +} + +static void fio_exit fio_sgio_unregister(void) +{ + unregister_ioengine(&ioengine); +}