diff options
author | Tom Cherry <tomcherry@google.com> | 2019-01-31 12:05:53 -0800 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2019-01-31 12:05:53 -0800 |
commit | fa712186270a56151d2fdfd3078d50334e0ae957 (patch) | |
tree | ff621342dcda66c8ac3fc5957123a88b6f1f6667 | |
parent | 99c6f41e4a064bb18bdaf4cf3f042af88295f081 (diff) | |
parent | d1e5f82aa2148a32b7eb0f228f39146ae7f5c330 (diff) | |
download | am57x-fa712186270a56151d2fdfd3078d50334e0ae957.tar.gz |
Move to new Fstab class am: 7af1c258e2
am: d1e5f82aa2
Change-Id: Idc3d966d47486d89aac2cf46fe81789a1c40dc72
-rw-r--r-- | bootctrl/bootloader_message.cpp | 11 |
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 ""; |