Duplicate name checks in ioengines.c
[fio.git] / engines / null.c
... / ...
CommitLineData
1/*
2 * null engine - doesn't do any transfers. Used to test fio.
3 *
4 */
5#include <stdio.h>
6#include <stdlib.h>
7#include <unistd.h>
8#include <errno.h>
9#include <assert.h>
10
11#include "../fio.h"
12#include "../os.h"
13
14static int fio_null_queue(struct thread_data fio_unused *td, struct io_u *io_u)
15{
16 io_u->resid = 0;
17 io_u->error = 0;
18 return FIO_Q_COMPLETED;
19}
20
21static struct ioengine_ops ioengine = {
22 .name = "null",
23 .version = FIO_IOOPS_VERSION,
24 .queue = fio_null_queue,
25 .flags = FIO_SYNCIO | FIO_NULLIO,
26};
27
28static void fio_init fio_null_register(void)
29{
30 register_ioengine(&ioengine);
31}
32
33static void fio_exit fio_null_unregister(void)
34{
35 unregister_ioengine(&ioengine);
36}