Allow non-existing fstab.postinstall
This file is only installed when cppreopts.sh is installed. However, the
latter might not be installed if system_other is not used.
Fixes: 155053192
Test: pass
Change-Id: I8569d72c03a260bd1be9dcccb5b9ae670117179c
diff --git a/dynamic_partition_control_android.cc b/dynamic_partition_control_android.cc
index 20e02ac..7486d09 100644
--- a/dynamic_partition_control_android.cc
+++ b/dynamic_partition_control_android.cc
@@ -556,7 +556,10 @@
const std::string& path) {
Fstab fstab;
if (!ReadFstabFromFile(path, &fstab)) {
- LOG(WARNING) << "Cannot read fstab from " << path;
+ PLOG(WARNING) << "Cannot read fstab from " << path;
+ if (errno == ENOENT) {
+ return false;
+ }
return std::nullopt;
}
for (const auto& entry : fstab) {