From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: Peter Korsgaard <jacmet@sunsite.dk>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCHv2] commands: add md5/sha1/sha256sum commands using the digest api
Date: Wed, 18 May 2011 09:50:00 +0200 [thread overview]
Message-ID: <20110518075000.GD15292@game.jcrosoft.org> (raw)
In-Reply-To: <87boz0fpmz.fsf@macbook.be.48ers.dk>
> >> + buf = xmalloc(4096);
>
> Jean-Christophe> do we really need to allocate the buffer everytime?
>
> Not really, but it's simpler to do like this. It's only once per file so
> hardly a performance issue.
>
> >> + while (*argv) {
> >> + char *filename = "/dev/mem";
> >> + ulong start = 0, size = ~0;
>
> Jean-Christophe> ulong so so if we want to support 64bit vfs we need to
> Jean-Christophe> use an other type
>
> ulong is what parse_area_spec and the other memory commands use.
Just note that the file size could be more than 32bit
and uze size_t or ssize_t make more sense in my mind
of we can use loff_t
Best Regards,
J.
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
prev parent reply other threads:[~2011-05-18 8:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-17 20:05 Peter Korsgaard
2011-05-18 5:08 ` Jean-Christophe PLAGNIOL-VILLARD
2011-05-18 7:12 ` Peter Korsgaard
2011-05-18 7:50 ` Jean-Christophe PLAGNIOL-VILLARD [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=20110518075000.GD15292@game.jcrosoft.org \
--to=plagnioj@jcrosoft.com \
--cc=barebox@lists.infradead.org \
--cc=jacmet@sunsite.dk \
/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