[PATCH] Link in known io engines

No real point in using dlopen() to find engines we know about. We still
support loading external modules, just give the name as the full path
to such a file.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
diff --git a/engines/fio-engine-libaio.c b/engines/fio-engine-libaio.c
index 12ddc98..45e69e9 100644
--- a/engines/fio-engine-libaio.c
+++ b/engines/fio-engine-libaio.c
@@ -7,8 +7,9 @@
 #include <unistd.h>
 #include <errno.h>
 #include <assert.h>
-#include "fio.h"
-#include "os.h"
+
+#include "../fio.h"
+#include "../os.h"
 
 #ifdef FIO_HAVE_LIBAIO
 
@@ -130,7 +131,7 @@
 	return 0;
 }
 
-struct ioengine_ops ioengine = {
+static struct ioengine_ops ioengine = {
 	.name		= "libaio",
 	.version	= FIO_IOOPS_VERSION,
 	.init		= fio_libaio_init,
@@ -155,10 +156,20 @@
 	return 1;
 }
 
-struct ioengine_ops ioengine = {
+static struct ioengine_ops ioengine = {
 	.name		= "libaio",
 	.version	= FIO_IOOPS_VERSION,
 	.init		= fio_libaio_init,
 };
 
 #endif
+
+static void fio_init fio_libaio_register(void)
+{
+	register_ioengine(&ioengine);
+}
+
+static void fio_exit fio_libaio_unregister(void)
+{
+	unregister_ioengine(&ioengine);
+}