+static inline void
+dump_oattrs(struct fastbuf *out, struct oattr *oa)
+{
+ for (; oa; oa = oa->next)
+ for (struct oattr *a=oa; a; a = a->same)
+ bprintf(out, "%c%s\n", a->attr, a->val);
+}
+
+static void
+dump_parsed_bucket(struct fastbuf *out, struct obuck_header *h, struct fastbuf *b)
+{
+ struct odes *o_hdr, *o_body;
+ mp_flush(pool);
+ o_hdr = obj_new(pool);
+ o_body = obj_new(pool);
+ if (buck2obj_parse(buck_buf, h->type, h->length, b, o_hdr, NULL, o_body) < 0)
+ bprintf(out, ".Cannot parse bucket %x of type %x and length %d: %m\n", h->oid, h->type, h->length);
+ else
+ {
+ dump_oattrs(out, o_hdr->attrs);
+ bputc(out, '\n');
+ dump_oattrs(out, o_body->attrs);
+ }
+}
+