Hi Suriyan, On 17 October 2014 13:17, Suriyan Ramasami <suriya...@gmail.com> wrote: > Hello Simon, > > On Thu, Oct 9, 2014 at 8:42 AM, Simon Glass <s...@chromium.org> wrote: >> +Tom for the question below re return values >> >> Hi, >> >> On 8 October 2014 15:54, Suriyan Ramasami <suriya...@gmail.com> wrote: >>> >>> On Wed, Oct 8, 2014 at 1:44 PM, Simon Glass <s...@chromium.org> wrote: >>> > Hi Suriyan, >>> > >>> > On 8 October 2014 14:23, Suriyan Ramasami <suriya...@gmail.com> wrote: >>> >> The commands fatls/ext4ls give -ve values when dealing with files > 2GB. >>> >> The commands fatsize/ext4size do not update the variable filesize for >>> >> these files. >>> >> >>> >> To deal with this, the functions *_size have been modified to take a >>> >> second >>> >> parameter of type "* off_t" which is then populated. The return value of >>> >> the >>> >> *_size function is then only used to determine error conditions. >>> > >>> > That seems like a sensible idea to me. >>> > >>> >>> Hello Simon, >>> I got the reply from Pavel as I was writing this. So, what do you >>> think of just changing the return value of these functions to off64_t >>> ? >> >> I don't have strong views on this but I believe it is slightly better >> to use a consistent error return value from all functions (int) as you >> have done and put loff_t or whatever as a parameter. Even for the size >> functions this seems better once we move to handling >2GB or >4GB. >> >> But yes a 64-bit value seems prudent despite the overhead. >> > > I also do think that having a consistent error return value from all > functions (int) seems more clean. > Hence, I am going forward in working on a patch towards that goal. I > am also introducing automated tests cases in test/ as you have > suggested (in a different thread). > BTW, I shall be using (loff_t *), for returning the actual size in the > extra parameter to the function calls.
That sounds good, thanks. Regards, Simon _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot