+static void ec_node_any_free_priv(struct ec_node *gen_node)
+{
+ struct ec_node_any *node = (struct ec_node_any *)gen_node;
+
+ ec_free(node->attr_name);
+}
+
+static const struct ec_config_schema ec_node_any_schema[] = {
+ {
+ .key = "attr",
+ .desc = "The optional attribute name to attach.",
+ .type = EC_CONFIG_TYPE_STRING,
+ },
+ {
+ .type = EC_CONFIG_TYPE_NONE,
+ },
+};
+
+static int ec_node_any_set_config(struct ec_node *gen_node,
+ const struct ec_config *config)
+{
+ struct ec_node_any *node = (struct ec_node_any *)gen_node;
+ const struct ec_config *value = NULL;
+ char *s = NULL;
+
+ value = ec_config_dict_get(config, "attr");
+ if (value != NULL) {
+ s = ec_strdup(value->string);
+ if (s == NULL)
+ goto fail;
+ }
+
+ ec_free(node->attr_name);
+ node->attr_name = s;
+
+ return 0;
+
+fail:
+ ec_free(s);
+ return -1;
+}
+