diff --git a/lib/io.c b/lib/io.c index f53d1b0ec..ed6f018eb 100644 --- a/lib/io.c +++ b/lib/io.c @@ -27,7 +27,6 @@ #include "io_format.h" #include "utils.h" #include "sample.h" -#include "plugin.h" int io_init(struct io *io, struct io_format *fmt, int flags) { @@ -300,14 +299,3 @@ int io_scan(struct io *io, struct sample *smps[], unsigned cnt) return ret; } - -struct io_format * io_format_lookup(const char *name) -{ - struct plugin *p; - - p = plugin_lookup(PLUGIN_TYPE_IO, name); - if (!p) - return NULL; - - return &p->io; -} diff --git a/lib/io_format.c b/lib/io_format.c index e857cfb9f..3ddaf2b4e 100644 --- a/lib/io_format.c +++ b/lib/io_format.c @@ -23,6 +23,7 @@ #include #include +#include "plugin.h" #include "io_format.h" int io_format_sscan(struct io_format *fmt, char *buf, size_t len, size_t *rbytes, struct sample *smps[], unsigned cnt, int flags) @@ -48,3 +49,14 @@ int io_format_fprint(struct io_format *fmt, FILE *f, struct sample *smps[], unsi { return fmt->fprint ? fmt->fprint(f, smps, cnt, flags) : -1; } + +struct io_format * io_format_lookup(const char *name) +{ + struct plugin *p; + + p = plugin_lookup(PLUGIN_TYPE_IO, name); + if (!p) + return NULL; + + return &p->io; +}