[PATCH] Fix random_map
[fio.git] / ioengines.c
index 9b1ad60692e0e7b76bfd3296e9bab64bd566dcd6..96a96360750038ea87909c8fdfd45f36a89c9d13 100644 (file)
@@ -42,13 +42,13 @@ static int check_engine_ops(struct ioengine_ops *ops)
        return 0;
 }
 
-struct ioengine_ops *load_ioengine(struct thread_data *td, char *name)
+struct ioengine_ops *load_ioengine(struct thread_data *td, const char *name)
 {
        char engine[16], engine_lib[256];
        struct ioengine_ops *ops, *ret;
        void *dlhandle;
 
-       strcpy(engine, name);
+       strncpy(engine, name, sizeof(engine) - 1);
 
        /*
         * linux libaio has alias names, so convert to what we want
@@ -111,14 +111,6 @@ int td_io_prep(struct thread_data *td, struct io_u *io_u)
        return 0;
 }
 
-int td_io_sync(struct thread_data *td, struct fio_file *f)
-{
-       if (td->io_ops->sync)
-               return td->io_ops->sync(td, f);
-
-       return 0;
-}
-
 int td_io_getevents(struct thread_data *td, int min, int max,
                    struct timespec *t)
 {