[PATCH] Fix a bunch of bugs

- engines/fio-engine-libaio.o needs to link against -laio and fio need not
  anymore. This caused funky crashes with libaio io engine.

- Fix a few bugs in the libaio engine.

- Only do sync/cleanup in do_io() if we exit without error.

- ->io_ops may be NULL in reap_threads(), if the job exited.

- Allocate io engine, don't reuse the dlopen() object.

- Overlapping sprintf() in init_disk_util().

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
diff --git a/stat.c b/stat.c
index e43a336..4ba8f19 100644
--- a/stat.c
+++ b/stat.c
@@ -239,7 +239,8 @@
 			log_err("unknown sysfs layout\n");
 			return;
 		}
-		sprintf(foo, "%s", p);
+		strcpy(tmp, p);
+		sprintf(foo, "%s", tmp);
 	}
 
 	td->sysfs_root = strdup(foo);