The problem is that the check to see if we're at the end is never reached. I
didn't look into it enough to know why fssize is 32 bytes larger than the
offset. There may be another bug here. Maybe something with the CBFS header
not being included or excluded from the calculation?
Anyway, this patch fixes it for all cases size > 32.
I also changed the error message so that it doesn't look like the ROM is full
just because it can't find room for a file.
Signed-off-by: Myles Watson <email@example.com>
Acked-by: Ronald G. Minnich <firstname.lastname@example.org>