null: add FIO_FAKEIO flag
[fio.git] / engines / null.c
index 9f9d8500b0516d393b756a10d1be5f9f19f00c59..e7df6a134d479c5ab370f496044619b18f6b15d2 100644 (file)
@@ -119,7 +119,7 @@ static struct ioengine_ops ioengine = {
        .init           = fio_null_init,
        .cleanup        = fio_null_cleanup,
        .open_file      = fio_null_open,
        .init           = fio_null_init,
        .cleanup        = fio_null_cleanup,
        .open_file      = fio_null_open,
-       .flags          = FIO_DISKLESSIO,
+       .flags          = FIO_DISKLESSIO | FIO_FAKEIO,
 };
 
 static void fio_init fio_null_register(void)
 };
 
 static void fio_init fio_null_register(void)
@@ -136,8 +136,10 @@ static void fio_exit fio_null_unregister(void)
 
 #ifdef FIO_EXTERNAL_ENGINE
 extern "C" {
 
 #ifdef FIO_EXTERNAL_ENGINE
 extern "C" {
-void get_ioengine(struct ioengine_ops **ioengine_ptr) {
+void get_ioengine(struct ioengine_ops **ioengine_ptr)
+{
        struct ioengine_ops *ioengine;
        struct ioengine_ops *ioengine;
+
        *ioengine_ptr = (struct ioengine_ops *) malloc(sizeof(struct ioengine_ops));
        ioengine = *ioengine_ptr;
 
        *ioengine_ptr = (struct ioengine_ops *) malloc(sizeof(struct ioengine_ops));
        ioengine = *ioengine_ptr;
 
@@ -150,7 +152,7 @@ void get_ioengine(struct ioengine_ops **ioengine_ptr) {
        ioengine->init           = fio_null_init;
        ioengine->cleanup        = fio_null_cleanup;
        ioengine->open_file      = fio_null_open;
        ioengine->init           = fio_null_init;
        ioengine->cleanup        = fio_null_cleanup;
        ioengine->open_file      = fio_null_open;
-       ioengine->flags          = FIO_DISKLESSIO;
+       ioengine->flags          = FIO_DISKLESSIO | FIO_FAKEIO;
 }
 }
 #endif /* FIO_EXTERNAL_ENGINE */
 }
 }
 #endif /* FIO_EXTERNAL_ENGINE */