libflash: fix bug on reading truncated flash file
libflash: fix bug on reading truncated flash file

If we had a truncated file where libflash would attempt to read past
the end, instead of erroring out, we'd get stuck in an infinite loop.

Why? Because we weren't acknowledging that read() returns 0 on EOF.

Signed-off-by: Stewart Smith <ec31ab75ddf977353c8f660f92ea8b23f64aef25@linux.vnet.ibm.com>
Reviewed-by: Cyril Bur <6ce38dade8c4b52fd55c193fae70fd1d1275c3c3@au1.ibm.com>

shenki/skiboot,open-power/skiboot,legoater/skiboot,mikey/skiboot,legoater/skiboot,stewart-ibm/skiboot,shenki/skiboot,legoater/skiboot,qemu/skiboot,mikey/skiboot,open-power/skiboot,open-power/skiboot,legoater/skiboot,open-power/skiboot,stewart-ibm/skiboot,qemu/skiboot,open-power/skiboot,shenki/skiboot,shenki/skiboot,shenki/skiboot,stewart-ibm/skiboot,qemu/skiboot,legoater/skiboot,qemu/skiboot,qemu/skiboot,mikey/skiboot