commit | 593a76995ae1c93173228540248953a604802291 | [log] [tgz] |
---|---|---|
author | Yifan Hong <elsk@google.com> | Wed Jun 03 14:57:30 2020 -0700 |
committer | Elliott Hughes <enh@google.com> | Thu Jun 04 19:07:39 2020 +0000 |
tree | 6fecd6e087e91adc8da45b76d41465694ecbaf4c | |
parent | b6a86ff14f6e48b8f152929a6c883b483564648d [diff] |
Stop using C++ streams. libvintf used to use std::ifstream to read files but incorrectly assumed that a non-zero value of errno implied failure. Because the implementation retries reads that fail with EAGAIN, this isn't true: a successful operation could still result in errno being set to EAGAIN. Use ReadFileToString from libbase which gives a clear boolean success/failure signal. Test: stress test Bug: 156701275 Change-Id: Ieedba32f61a76ffcf96f7c06d89df70b5f94813b