From: Peter Korsgaard <jacmet@sunsite.dk>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH] commands: add md5/sha1/sha256sum commands using the digest api
Date: Tue, 17 May 2011 22:05:34 +0200 [thread overview]
Message-ID: <87oc31f5yp.fsf@macbook.be.48ers.dk> (raw)
In-Reply-To: <20110517170923.GG30963@pengutronix.de> (Sascha Hauer's message of "Tue, 17 May 2011 19:09:23 +0200")
>>>>> "Sascha" == Sascha Hauer <s.hauer@pengutronix.de> writes:
Hi,
>> commands/mem.c: buf = xmalloc(RW_BUF_SIZE);
Sascha> And I am perfectly fine with this at least for fixed small length
Sascha> allocations. And I consider 4096 bytes small enough.
Ok, good.
>> Maybe. I wanted something automatic rather than a series of strcmp
>> checks, but feel free to suggest something else.
Sascha> You could use three different functions called by the command
Sascha> descriptors and pass a string with the digest name to do_digest.
Ok, will change.
Jean-Christophe> do we really need to stop if ine of them is not availlable
>> I don't feel strongly about it, but it seems the simplest solution.
Sascha> How about printing an error and continue? That's what my host md5sum
Sascha> does.
Ok, will change.
Jean-Christophe> and we should check the getc to be able to interrupt it
>>
>> crc doesn't do that either, but ok - I can add a ctrlc() check in the
>> main loop.
Sascha> It's good practice. It's nice being able to interrupt if this
Sascha> command is accidently being called on a veray large file.
Ok, will change.
I'll send a v2 shortly.
--
Bye, Peter Korsgaard
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
prev parent reply other threads:[~2011-05-17 20:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-17 12:10 Peter Korsgaard
2011-05-17 12:30 ` Jean-Christophe PLAGNIOL-VILLARD
2011-05-17 13:10 ` Peter Korsgaard
2011-05-17 17:09 ` Sascha Hauer
2011-05-17 20:05 ` Peter Korsgaard [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87oc31f5yp.fsf@macbook.be.48ers.dk \
--to=jacmet@sunsite.dk \
--cc=barebox@lists.infradead.org \
--cc=s.hauer@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox