[PATCH] Link in known io engines
[fio.git] / engines / fio-engine-splice.c
index 3b02fbfdbb83c45906810e0126f1d2d65cc74cb0..fa4a6ee1db21ff192d811f1a95dfacc05de35483 100644 (file)
@@ -8,8 +8,9 @@
 #include <errno.h>
 #include <assert.h>
 #include <sys/poll.h>
-#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);
+}