Hi, On 08/06/2011 01:18 PM, Mike Frysinger wrote: > On Fri, Aug 5, 2011 at 09:23, David Wagner wrote: >> +#include <endian.h> > > this is not portable. include compiler.h and use the already existing > uswap/cpu_to/to_cpu/etc... helpers. > >> +static void usage(void) >> +{ >> + printf("envcrc [-h] [-r] [-b] -s <envrionnment partition size> -o <output> " > > funny, "envcrc" isnt what the filename actually is ...
ah, yes, it began as an attempt to extend envcrc but ended up fairly different. > seems like this should also take a padding byte so people can use a > more sensible 0xff rather than 0x00 Thomas told me that when padding with 0xff, his environment image wouldn't be taken into account anymore. I'll add the option anyway, but do you know what could be happening ? Also, I guess this makes necessary making sure there is a \0 after the last configuration line. >> + if (fwrite(dataptr, 1, datasize, bin_file) != datasize) { > > funny enough, you got the size/nemb args in the right order here ;) > -mike I wasn't sure whether the proper way of doing it was "read/write 1 byte, N times" or "read/write the size of the file, 1 time". I probably changed my mine in between. Thanks for reviewing ; David. -- David Wagner, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot