From 0a4083a5a04131565d858d2feb699562aeaecf0f Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Sun, 15 Aug 2004 10:16:03 +0000 Subject: [PATCH] Made `buckettool -x' show the header if in verbose mode. Also use bbcopy_slow() for copying bucket contents. --- lib/buckettool.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/lib/buckettool.c b/lib/buckettool.c index a5ac3008..396138af 100644 --- a/lib/buckettool.c +++ b/lib/buckettool.c @@ -120,20 +120,17 @@ static void extract(char *id) { struct fastbuf *b, *out; - byte buf[1024]; - int l; struct obuck_header h; h.oid = parse_id(id); obuck_init(0); obuck_find_by_oid(&h); out = bfdopen_shared(1, 65536); + if (verbose) + bprintf(out, "### %08x %6d %08x\n", h.oid, h.length, h.type); b = obuck_fetch(); if (h.type < BUCKET_TYPE_V33 || !buck_buf) - { - while ((l = bread(b, buf, sizeof(buf)))) - bwrite(out, buf, l); - } + bbcopy_slow(b, out, ~0U); else dump_parsed_bucket(out, &h, b); bclose(b); -- 2.39.2