diff options
author | Yifan Hong <elsk@google.com> | 2020-04-27 12:59:29 -0700 |
---|---|---|
committer | Yifan Hong <elsk@google.com> | 2020-04-28 00:28:21 +0000 |
commit | 4b28a53926e27d47fac7784be553c494ae44753f (patch) | |
tree | 274a0feb63d3a634c9bfed965c7b0a2b708626fd | |
parent | 23279926785d1933954ca0cb65e9d99c5e793059 (diff) | |
download | update_engine-4b28a53926e27d47fac7784be553c494ae44753f.tar.gz |
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.
Bug: 155053192
Test: pass
Change-Id: I8569d72c03a260bd1be9dcccb5b9ae670117179c
(cherry picked from commit 93cde30635c844c9a78b78dcea283af0e70767ee)
Merged-In: I8569d72c03a260bd1be9dcccb5b9ae670117179c
-rw-r--r-- | dynamic_partition_control_android.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/dynamic_partition_control_android.cc b/dynamic_partition_control_android.cc index a310f209..48ad5f03 100644 --- a/dynamic_partition_control_android.cc +++ b/dynamic_partition_control_android.cc @@ -547,7 +547,10 @@ std::optional<bool> DynamicPartitionControlAndroid::IsAvbEnabledInFstab( 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) { |