Hi All,

I would like to read a configuration file from an ext4 disk partition in u-boot 
and parse its contents. In order to malloc a buffer of sufficient size to read 
the entire file contents, I would need to know the file size before actually 
reading it.

As far as I understand, the current struct fstype_info API does not allow me to 
do that (other than parsing the ls output). While the read function does in 
fact return the file size, it does so only after the file was already read into 
memory. Lower level functions for ext4 such as ext4fs_open() do however provide 
this information before reading the file contents. Unless there is something 
that I have missed, how would you feel about me adding a .size function to the 
struct fstype_info API to expose this information on the top-level API?

Thanks,
Frank

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to