summaryrefslogtreecommitdiffstats
path: root/roots.cpp
diff options
context:
space:
mode:
authorTom Cherry <tomcherry@google.com>2019-01-31 20:50:09 +0100
committerandroid-build-merger <android-build-merger@google.com>2019-01-31 20:50:09 +0100
commit9594188eeab30fb5833ca8e2a4a75dfa3a0fe743 (patch)
tree6d6f3af85cfb41d60b688de9e0a9049b37b6f139 /roots.cpp
parentMerge "Fix potential size overflow in blockimg.cpp" (diff)
parentMerge "Add android::fs_mgr namespace for new Fstab code" (diff)
downloadandroid_bootable_recovery-9594188eeab30fb5833ca8e2a4a75dfa3a0fe743.tar
android_bootable_recovery-9594188eeab30fb5833ca8e2a4a75dfa3a0fe743.tar.gz
android_bootable_recovery-9594188eeab30fb5833ca8e2a4a75dfa3a0fe743.tar.bz2
android_bootable_recovery-9594188eeab30fb5833ca8e2a4a75dfa3a0fe743.tar.lz
android_bootable_recovery-9594188eeab30fb5833ca8e2a4a75dfa3a0fe743.tar.xz
android_bootable_recovery-9594188eeab30fb5833ca8e2a4a75dfa3a0fe743.tar.zst
android_bootable_recovery-9594188eeab30fb5833ca8e2a4a75dfa3a0fe743.zip
Diffstat (limited to 'roots.cpp')
-rw-r--r--roots.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/roots.cpp b/roots.cpp
index 290be477c..7a922b8ee 100644
--- a/roots.cpp
+++ b/roots.cpp
@@ -45,6 +45,10 @@
#include "otautil/mounts.h"
#include "otautil/sysutil.h"
+using android::fs_mgr::Fstab;
+using android::fs_mgr::FstabEntry;
+using android::fs_mgr::ReadDefaultFstab;
+
static Fstab fstab;
extern struct selabel_handle* sehandle;
@@ -69,10 +73,7 @@ void load_volume_table() {
}
Volume* volume_for_mount_point(const std::string& mount_point) {
- auto it = std::find_if(fstab.begin(), fstab.end(), [&mount_point](const auto& entry) {
- return entry.mount_point == mount_point;
- });
- return it == fstab.end() ? nullptr : &*it;
+ return android::fs_mgr::GetEntryForMountPoint(&fstab, mount_point);
}
// Mount the volume specified by path at the given mount_point.