Re: [PATCHv2] commands: add md5/sha1/sha256sum commands using the digest api

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



 
>  >> +	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@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox


[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux