Fix segmentation fault while specifying clustername with rbd engine
[fio.git] / options.h
index 6a5db0762183c2818a0b55afa888da768188ae28..539a63667afb505ad6b61a8bc9b299297a8ed9dd 100644 (file)
--- a/options.h
+++ b/options.h
@@ -20,7 +20,7 @@ void del_opt_posval(const char *, const char *);
 struct thread_data;
 void fio_options_free(struct thread_data *);
 char *get_name_idx(char *, int);
-int set_name_idx(char *, size_t, char *, int);
+int set_name_idx(char *, size_t, char *, int, bool);
 
 extern char client_sockaddr_str[];  /* used with --client option */
 
@@ -47,19 +47,8 @@ static inline bool o_match(struct fio_option *o, const char *opt)
        return false;
 }
 
-static inline struct fio_option *find_option(struct fio_option *options,
-                                            const char *opt)
-{
-       struct fio_option *o;
-
-       for (o = &options[0]; o->name; o++)
-               if (o_match(o, opt))
-                       return o;
-
-       return NULL;
-}
-
-extern struct fio_option *fio_option_find(const char *name);
+extern struct fio_option *find_option(struct fio_option *, const char *);
+extern struct fio_option *fio_option_find(const char *);
 extern unsigned int fio_get_kb_base(void *);
 
 #endif