[U-Boot] [PATCHv3 4/8] mkenvimage: More error handling

2012-01-08 Thread David Wagner
Verbosly fail if the target environment size or the padding byte are badly formated. Verbosly fail if something bad happens when reading from standard input. Signed-off-by: David Wagner david.wag...@free-electrons.com --- tools/mkenvimage.c | 30 -- 1 files

Re: [U-Boot] [PATCHv3 4/8] mkenvimage: More error handling

2012-01-08 Thread Mike Frysinger
On Sunday 08 January 2012 09:25:21 David Wagner wrote: --- a/tools/mkenvimage.c +++ b/tools/mkenvimage.c +long int xstrtol(char *s) const +{ + long int tmp; + + tmp = strtol(s, NULL, 0); + if (!errno) + return tmp; you should manually clear errno before