aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bootloader_message/bootloader_message.cpp10
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 @@
19#include <errno.h> 19#include <errno.h>
20#include <fcntl.h> 20#include <fcntl.h>
21#include <string.h> 21#include <string.h>
22#include <unistd.h>
23 22
24#include <string> 23#include <string>
25#include <vector> 24#include <vector>
@@ -31,13 +30,8 @@
31#include <fs_mgr.h> 30#include <fs_mgr.h>
32 31
33static std::string get_misc_blk_device(std::string* err) { 32static std::string get_misc_blk_device(std::string* err) {
34 std::unique_ptr<fstab, decltype(&fs_mgr_free_fstab)> fstab(nullptr, fs_mgr_free_fstab); 33 std::unique_ptr<fstab, decltype(&fs_mgr_free_fstab)> fstab(fs_mgr_read_fstab_default(),
35 // Use different fstab paths for normal boot and recovery boot, respectively 34 fs_mgr_free_fstab);
36 if (access("/sbin/recovery", F_OK) == 0) {
37 fstab.reset(fs_mgr_read_fstab_with_dt("/etc/recovery.fstab"));
38 } else {
39 fstab.reset(fs_mgr_read_fstab_default());
40 }
41 if (!fstab) { 35 if (!fstab) {
42 *err = "failed to read default fstab"; 36 *err = "failed to read default fstab";
43 return ""; 37 return "";