update_engine: Fix PReadAll and PWriteAll to be able to seek to 0.
Currently, we cannot Seek to 0 in a file in PReadAll/PWriteAll.
Seek returns the offset seeked if successful, so if the offset is
zero, this is cast to False in PRead/WriteAll and returns an error.
BUG=chromium:480751
TEST=`cros flash` image to itself, unit tests.
Change-Id: I1f49784256acd4e8309abf4ec3b30aae39d71ff6
Reviewed-on: https://chromium-review.googlesource.com/266983
Reviewed-by: Alex Deymo <deymo@chromium.org>
Commit-Queue: Allie Wood <alliewood@chromium.org>
Trybot-Ready: Allie Wood <alliewood@chromium.org>
Tested-by: Allie Wood <alliewood@chromium.org>
1 file changed