+static size_t
+ec_node_cmd_get_children_count(const struct ec_node *gen_node)
+{
+ struct ec_node_cmd *node = (struct ec_node_cmd *)gen_node;
+
+ if (node->cmd == NULL)
+ return 0;
+ return 1;
+}
+
+static int
+ec_node_cmd_get_child(const struct ec_node *gen_node, size_t i,
+ struct ec_node **child, unsigned int *refs)
+{
+ struct ec_node_cmd *node = (struct ec_node_cmd *)gen_node;
+
+ if (i > 0)
+ return -1;
+
+ *child = node->cmd;
+ *refs = 1;
+ return 0;
+}
+
+static struct ec_node_type ec_node_cmd_type = {
+ .name = "cmd",
+ .schema = ec_node_cmd_schema,
+ .set_config = ec_node_cmd_set_config,
+ .parse = ec_node_cmd_parse,
+ .complete = ec_node_cmd_complete,
+ .size = sizeof(struct ec_node_cmd),
+ .free_priv = ec_node_cmd_free_priv,
+ .get_children_count = ec_node_cmd_get_children_count,
+ .get_child = ec_node_cmd_get_child,
+};
+
+EC_NODE_TYPE_REGISTER(ec_node_cmd_type);
+