summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Cherry <tomcherry@google.com>2019-01-31 12:23:04 -0800
committerandroid-build-merger <android-build-merger@google.com>2019-01-31 12:23:04 -0800
commit6cd2c07362f2c44ecd886535a70dca8f1b555711 (patch)
tree9bf25d27fae0d61afd51112cb6d1c58d236f7675
parentfc0b71fc03b98cd025d009d5838dae3a74f1eb81 (diff)
parentfa712186270a56151d2fdfd3078d50334e0ae957 (diff)
downloadam57x-6cd2c07362f2c44ecd886535a70dca8f1b555711.tar.gz
Move to new Fstab class am: 7af1c258e2 am: d1e5f82aa2
am: fa71218627 Change-Id: I775f849b8011602051b33d274afb3f804961a402
-rw-r--r--bootctrl/bootloader_message.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/bootctrl/bootloader_message.cpp b/bootctrl/bootloader_message.cpp
index a4634ed..aac43e6 100644
--- a/bootctrl/bootloader_message.cpp
+++ b/bootctrl/bootloader_message.cpp
@@ -29,16 +29,19 @@
#include <android-base/unique_fd.h>
#include <fstab/fstab.h>
+using android::fs_mgr::Fstab;
+using android::fs_mgr::GetEntryForMountPoint;
+using android::fs_mgr::ReadDefaultFstab;
+
constexpr off_t kBootloaderControlOffset = offsetof(bootloader_message_ab, slot_suffix);
static std::string get_misc_blk_device(std::string* err) {
- std::unique_ptr<fstab, decltype(&fs_mgr_free_fstab)> fstab(fs_mgr_read_fstab_default(),
- fs_mgr_free_fstab);
- if (!fstab) {
+ Fstab fstab;
+ if (!ReadDefaultFstab(&fstab)) {
*err = "failed to read default fstab";
return "";
}
- fstab_rec* record = fs_mgr_get_entry_for_mount_point(fstab.get(), "/misc");
+ auto record = GetEntryForMountPoint(&fstab, "/misc");
if (record == nullptr) {
*err = "failed to find /misc partition";
return "";