+/*
+ * \return \a root if \a name is \p NULL.
+ */
+struct btr_node *btr_search_node(const char *name, struct btr_node *root)
+{
+ struct btr_node *ch;
+
+ if (!name)
+ return root;
+ if (!strcmp(root->name, name))
+ return root;
+ FOR_EACH_CHILD(ch, root) {
+ struct btr_node *result = btr_search_node(name, ch);
+ if (result)
+ return result;
+ }
+ return NULL;
+}
+