7 static FLIST_HEAD(profile_list);
9 int load_profile(const char *profile)
11 struct profile_ops *ops;
14 dprint(FD_PROFILE, "loading profile '%s'\n", profile);
16 flist_for_each(n, &profile_list) {
17 ops = flist_entry(n, struct profile_ops, list);
18 if (!strcmp(profile, ops->name))
26 add_job_opts(ops->cmdline);
30 log_err("fio: profile '%s' not found\n", profile);
34 static int add_profile_options(struct profile_ops *ops)
43 o->prof_name = ops->name;
52 int register_profile(struct profile_ops *ops)
56 dprint(FD_PROFILE, "register profile '%s'\n", ops->name);
57 flist_add_tail(&ops->list, &profile_list);
58 ret = add_profile_options(ops);
60 invalidate_profile_options(ops->name);
65 void unregister_profile(struct profile_ops *ops)
67 dprint(FD_PROFILE, "unregister profile '%s'\n", ops->name);
68 flist_del(&ops->list);
69 invalidate_profile_options(ops->name);