X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=engines%2Ffio-engine-posixaio.c;h=ef4d78ebe8a58c03465eb33cdc58aa7f90b52d7c;hp=894a410a459117571518c00b66abe2d790a81183;hb=5f350952eff89948bfbf1eb6ac4d3d08a9109581;hpb=be67e2de7961e849d5ad82e8c9206377c325b7c8;ds=inline diff --git a/engines/fio-engine-posixaio.c b/engines/fio-engine-posixaio.c index 894a410a..ef4d78eb 100644 --- a/engines/fio-engine-posixaio.c +++ b/engines/fio-engine-posixaio.c @@ -7,8 +7,9 @@ #include #include #include -#include "fio.h" -#include "os.h" + +#include "../fio.h" +#include "../os.h" #ifdef FIO_HAVE_POSIXAIO @@ -179,7 +180,7 @@ static int fio_posixaio_init(struct thread_data *td) return 0; } -struct ioengine_ops ioengine = { +static struct ioengine_ops ioengine = { .name = "posixaio", .version = FIO_IOOPS_VERSION, .init = fio_posixaio_init, @@ -204,10 +205,20 @@ static int fio_posixaio_init(struct thread_data fio_unused *td) return 1; } -struct ioengine_ops ioengine = { +static struct ioengine_ops ioengine = { .name = "posixaio", .version = FIO_IOOPS_VERSION, .init = fio_posixaio_init, }; #endif + +static void fio_init fio_posixaio_register(void) +{ + register_ioengine(&ioengine); +} + +static void fio_exit fio_posixaio_unregister(void) +{ + unregister_ioengine(&ioengine); +}