-ec_config_list_dump(FILE *out, const struct ec_config_list *list,
- size_t indent)
+ec_config_list_dump(FILE *out, const char *key,
+ const struct ec_config_list *list, size_t indent)
- fprintf(out, "%*s" "type=list:\n", (int)indent * 4, "");
+ fprintf(out, "%*s" "%s%s%stype=list\n", (int)indent * 4, "",
+ key ? "key=": "",
+ key ? key: "",
+ key ? " ": "");
TAILQ_FOREACH(v, list, next) {
if (__ec_config_dump(out, NULL, v, indent + 1) < 0)
TAILQ_FOREACH(v, list, next) {
if (__ec_config_dump(out, NULL, v, indent + 1) < 0)
-ec_config_dict_dump(FILE *out, const struct ec_keyval *dict,
+ec_config_dict_dump(FILE *out, const char *key, const struct ec_keyval *dict,
for (iter = ec_keyval_iter(dict);
ec_keyval_iter_valid(iter);
ec_keyval_iter_next(iter)) {
for (iter = ec_keyval_iter(dict);
ec_keyval_iter_valid(iter);
ec_keyval_iter_next(iter)) {
- if (__ec_config_dump(out, key, value, indent + 1) < 0)
+ if (__ec_config_dump(out, k, value, indent + 1) < 0)
ec_asprintf(&val_str, "%p", value->node);
break;
case EC_CONFIG_TYPE_LIST:
ec_asprintf(&val_str, "%p", value->node);
break;
case EC_CONFIG_TYPE_LIST:
- return ec_config_list_dump(out, &value->list, indent);
+ return ec_config_list_dump(out, key, &value->list, indent);
- return ec_config_dict_dump(out, value->dict, indent);
+ return ec_config_dict_dump(out, key, value->dict, indent);