summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorandroid-build-team Robot2019-02-02 22:04:07 -0600
committerandroid-build-team Robot2019-02-02 22:04:07 -0600
commit55cd0a3096b6eb264444dc05a0024fbd793d9a2e (patch)
tree9bf25d27fae0d61afd51112cb6d1c58d236f7675
parentdbeb2aa69f950eba2e087281df0bde851fd2d873 (diff)
parent6cd2c07362f2c44ecd886535a70dca8f1b555711 (diff)
downloadhardware-ti-am57x-55cd0a3096b6eb264444dc05a0024fbd793d9a2e.tar.gz
hardware-ti-am57x-55cd0a3096b6eb264444dc05a0024fbd793d9a2e.tar.xz
hardware-ti-am57x-55cd0a3096b6eb264444dc05a0024fbd793d9a2e.zip
Snap for 5280121 from 6cd2c07362f2c44ecd886535a70dca8f1b555711 to qt-release
Change-Id: Id951a72d83d4fb5a2bdfe4c832f5156b0a04de69
-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 @@
29#include <android-base/unique_fd.h> 29#include <android-base/unique_fd.h>
30#include <fstab/fstab.h> 30#include <fstab/fstab.h>
31 31
32using android::fs_mgr::Fstab;
33using android::fs_mgr::GetEntryForMountPoint;
34using android::fs_mgr::ReadDefaultFstab;
35
32constexpr off_t kBootloaderControlOffset = offsetof(bootloader_message_ab, slot_suffix); 36constexpr off_t kBootloaderControlOffset = offsetof(bootloader_message_ab, slot_suffix);
33 37
34static std::string get_misc_blk_device(std::string* err) { 38static std::string get_misc_blk_device(std::string* err) {
35 std::unique_ptr<fstab, decltype(&fs_mgr_free_fstab)> fstab(fs_mgr_read_fstab_default(), 39 Fstab fstab;
36 fs_mgr_free_fstab); 40 if (!ReadDefaultFstab(&fstab)) {
37 if (!fstab) {
38 *err = "failed to read default fstab"; 41 *err = "failed to read default fstab";
39 return ""; 42 return "";
40 } 43 }
41 fstab_rec* record = fs_mgr_get_entry_for_mount_point(fstab.get(), "/misc"); 44 auto record = GetEntryForMountPoint(&fstab, "/misc");
42 if (record == nullptr) { 45 if (record == nullptr) {
43 *err = "failed to find /misc partition"; 46 *err = "failed to find /misc partition";
44 return ""; 47 return "";