return (len == 0 && btr_no_parent(btrn));
}
+
+void log_tree_recursively(struct btr_node *btrn, int loglevel, int depth)
+{
+ struct btr_node *ch;
+ const char spaces[] = " ", *space = spaces + 16 - depth;
+
+ if (depth > 16)
+ return;
+ para_log(loglevel, "%s%s\n", space, btrn->name);
+ FOR_EACH_CHILD(ch, btrn)
+ log_tree_recursively(ch, loglevel, depth + 1);
+}
+
+void btr_log_tree(struct btr_node *btrn, int loglevel)
+{
+ return log_tree_recursively(btrn, loglevel, 0);
+}
void *btr_context(struct btr_node *btrn);
void btr_merge(struct btr_node *btrn, size_t dest_size);
bool btr_eof(struct btr_node *btrn);
+void btr_log_tree(struct btr_node *btrn, int loglevel);
s.default_timeout.tv_sec = 1;
s.default_timeout.tv_usec = 0;
+ btr_log_tree(sit->btrn, LL_INFO);
ret = schedule(&s);
err:
if (ret < 0)