Reland "Add ParseFstabFromString(), remove ReadFstabFromFp()"
ReadFstabFromFp() have two callers right now, ReadFstabFromFile() and ReadFstabFromDt(). ReadFstabFromFile() opens a FILE* and pass it to ReadFstabFromFp(), and ReadFstabFromDt() wraps a std::string::c_str() buffer in a FILE* adaptor with fmemopen(). There's no need for such adaptor, just change ReadFstabFromFp() to accept std::string and we're good. Bug: 206740783 Bug: 204056804 Test: atest CtsFsMgrTestCases Test: m libfstab_fuzzer Change-Id: I3f56a83ec5baf7b0d97a618a2c2bb6e31b67b5d9
Loading
Please register or sign in to comment