On Mon, Sep 3, 2012 at 6:48 PM, Liu Yuan <namei.u...@gmail.com> wrote: > On 09/03/2012 06:38 PM, Yunkai Zhang wrote: >> collie/vdi.c need to use this function, if we put it in >> ../farm/sha1_file.c, we should modify collie/Makefie.am to include >> farm/sha1_file.c, it seems werid. >> +diff: >> + fprintf(stderr, "Failed oid: %"PRIx64"\n", oid); >> + for (i = 0; i < nr_copies; i++) { >> + addr_to_str(host, sizeof(host), nids[i].addr, 0); >> + fprintf(stderr, ">> copy[%d], sha1: %s, from: %s:%d\n", >> + i, sha1_to_hex(sha1[i]), host, nids[i].port); >> + } > > So only fprintf() needs it. why user need this information? I think for > now end user don't need these hex strings. Showing hash value of data to > end users isn't useful as far as I know.
We can compare this result with comand line tools: sha1sum, which can also help us to verify program's correction I think. > > Thanks, > Yuan -- Yunkai Zhang Work at Taobao -- sheepdog mailing list sheepdog@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/sheepdog