[PATCH] init.c: Expose f_out and f_err to loaded libraries via dlsym()
Loaded ioengines would like to use the logging functions but can't, as
they can't see f_out and f_err. Create get_f_{out,err}() so that
the libraries can dlsym() them. Compile fio with -rdynamic so dlopen()
works.
Signed-off-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
diff --git a/init.c b/init.c
index 624814a..c6837c9 100644
--- a/init.c
+++ b/init.c
@@ -608,6 +608,16 @@
static int write_lat_log = 0;
int write_bw_log = 0;
+FILE *get_f_out()
+{
+ return f_out;
+}
+
+FILE *get_f_err()
+{
+ return f_err;
+}
+
/*
* Return a free job structure.
*/