+ GNode *node, *nparent;
+
+ /*
+ * Insert node with either the root parent, or an
+ * option parent.
+ */
+ node = g_node_new(o);
+ nparent = gopt_dep_tree;
+ if (o->parent) {
+ struct fio_option *parent;
+
+ parent = fio_option_find(o->parent);
+ nparent = g_node_find(gopt_dep_tree, G_IN_ORDER, G_TRAVERSE_ALL, parent);
+ if (!nparent) {
+ log_err("fio: did not find parent %s for opt %s\n", o->name, o->parent);
+ nparent = gopt_dep_tree;
+ }
+ }
+
+ g_node_insert(nparent, -1, node);