diff options
| author | Bowgo Tsai <bowgotsai@google.com> | 2017-03-27 17:47:21 +0000 |
|---|---|---|
| committer | Bowgo Tsai <bowgotsai@google.com> | 2017-03-27 17:47:21 +0000 |
| commit | 4508f2388419dc15c7d9a9c0ebb82d9e5d67c993 (patch) | |
| tree | 35eb550ac980d9a85e12833d6054e1f05e9e58fc /bootloader_message | |
| parent | 37bd44174bf2511320961f3f8cd1f698a1c72b66 (diff) | |
Revert "libbootloader_message: use different fstab paths for normal/recovery boot"
This reverts commit 37bd44174bf2511320961f3f8cd1f698a1c72b66.
The logic here is better to be moved into fs_mgr, not fs_mgr clients.
Bug: 35811655
Bug: 36502022
Change-Id: Iae79bd8f7131516ad223f3323f1bc1d805206d51
Test: normal boot sailfish, go to Settings > System & tap
on "Factory Data reset"
Test: recovery boot sailfish
Diffstat (limited to 'bootloader_message')
| -rw-r--r-- | bootloader_message/bootloader_message.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/bootloader_message/bootloader_message.cpp b/bootloader_message/bootloader_message.cpp index d17e055b..d8086be2 100644 --- a/bootloader_message/bootloader_message.cpp +++ b/bootloader_message/bootloader_message.cpp @@ -19,7 +19,6 @@ #include <errno.h> #include <fcntl.h> #include <string.h> -#include <unistd.h> #include <string> #include <vector> @@ -31,13 +30,8 @@ #include <fs_mgr.h> static std::string get_misc_blk_device(std::string* err) { - std::unique_ptr<fstab, decltype(&fs_mgr_free_fstab)> fstab(nullptr, fs_mgr_free_fstab); - // Use different fstab paths for normal boot and recovery boot, respectively - if (access("/sbin/recovery", F_OK) == 0) { - fstab.reset(fs_mgr_read_fstab_with_dt("/etc/recovery.fstab")); - } else { - fstab.reset(fs_mgr_read_fstab_default()); - } + std::unique_ptr<fstab, decltype(&fs_mgr_free_fstab)> fstab(fs_mgr_read_fstab_default(), + fs_mgr_free_fstab); if (!fstab) { *err = "failed to read default fstab"; return ""; |
