X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=engines%2Ffio-engine-splice.c;h=fa4a6ee1db21ff192d811f1a95dfacc05de35483;hp=3b02fbfdbb83c45906810e0126f1d2d65cc74cb0;hb=5f350952eff89948bfbf1eb6ac4d3d08a9109581;hpb=34cfcdafa994a0a75120e498c51eda08bde5df72 diff --git a/engines/fio-engine-splice.c b/engines/fio-engine-splice.c index 3b02fbfd..fa4a6ee1 100644 --- a/engines/fio-engine-splice.c +++ b/engines/fio-engine-splice.c @@ -8,8 +8,9 @@ #include #include #include -#include "fio.h" -#include "os.h" + +#include "../fio.h" +#include "../os.h" #ifdef FIO_HAVE_SPLICE @@ -181,7 +182,7 @@ static int fio_spliceio_init(struct thread_data *td) return 0; } -struct ioengine_ops ioengine = { +static struct ioengine_ops ioengine = { .name = "splice", .version = FIO_IOOPS_VERSION, .init = fio_spliceio_init, @@ -205,10 +206,20 @@ static int fio_spliceio_init(struct thread_data fio_unused *td) return 1; } -struct ioengine_ops ioengine = { +static struct ioengine_ops ioengine = { .name = "splice", .version = FIO_IOOPS_VERSION, .init = fio_spliceio_init, }; #endif + +static void fio_init fio_spliceio_register(void) +{ + register_ioengine(&ioengine); +} + +static void fio_exit fio_spliceio_unregister(void) +{ + unregister_ioengine(&ioengine); +}