From: Martin Mares Date: Sun, 15 Aug 2004 10:16:03 +0000 (+0000) Subject: Made `buckettool -x' show the header if in verbose mode. X-Git-Tag: holmes-import~923 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=0a4083a5a04131565d858d2feb699562aeaecf0f;p=libucw.git Made `buckettool -x' show the header if in verbose mode. Also use bbcopy_slow() for copying bucket contents. --- 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);