commit | a5d863b5c568ba4f062491be16ed490fd2db131b | [log] [tgz] |
---|---|---|
author | Mathieu Chartier <mathieuc@google.com> | Fri Nov 02 08:05:31 2018 -0700 |
committer | Mathieu Chartier <mathieuc@google.com> | Fri Nov 02 08:24:38 2018 -0700 |
tree | 6416058eb37f51cc7e4371ccb217447d5816cfdd | |
parent | a87b388b319b5a0c03de99d20e3f9460b97919a7 [diff] |
libbase: add Fdopendir that takes a unique_fd. Using fdopendir with unique_fd correctly is more annoying than it should be, because fdopendir doesn't close the file descriptor received upon failure. Add an android::base::Fdopendir that does that handles the failure case. Bug: 118818285 Test: treehugger Change-Id: I5dbbe0eb82242bc7716f84735ffc7644febcfd65