pflash: Respect write(2) return values
pflash: Respect write(2) return values

The write(2) system call returns the number of bytes written, this is
important since it is entitled to write less than what we requested.
Currently we ignore the return value and assume it wrote everything we
requested. While in practice this is likely to always be the case, it
isn't actually correct.

This patch addresses this.

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

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