[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-mmap.c b/engines/fio-engine-mmap.c
index 483a704..20dcfd2 100644
--- a/engines/fio-engine-mmap.c
+++ b/engines/fio-engine-mmap.c
@@ -8,8 +8,9 @@
 #include <errno.h>
 #include <assert.h>
 #include <sys/mman.h>
-#include "fio.h"
-#include "os.h"
+
+#include "../fio.h"
+#include "../os.h"
 
 struct mmapio_data {
 	struct io_u *last_io_u;
@@ -88,7 +89,7 @@
 	return 0;
 }
 
-struct ioengine_ops ioengine = {
+static struct ioengine_ops ioengine = {
 	.name		= "mmap",
 	.version	= FIO_IOOPS_VERSION,
 	.init		= fio_mmapio_init,
@@ -98,3 +99,13 @@
 	.cleanup	= fio_mmapio_cleanup,
 	.flags		= FIO_SYNCIO | FIO_MMAPIO,
 };
+
+static void fio_init fio_mmapio_register(void)
+{
+	register_ioengine(&ioengine);
+}
+
+static void fio_exit fio_mmapio_unregister(void)
+{
+	unregister_ioengine(&ioengine);
+}