summaryrefslogtreecommitdiffstats
path: root/fs_mgr
diff options
context:
space:
mode:
authorSandeep Patil <sspatil@google.com>2017-11-10 14:56:54 -0800
committerSandeep Patil <sspatil@google.com>2017-11-10 16:20:27 -0800
commit25f1631aa765b2e6a972ff164e81ba06f8769a10 (patch)
treeaf88113355923c3a170e282c1bd7cbe6f92450cc /fs_mgr
parent78d882bb5f52c42b788a2ee0c07c71d267811561 (diff)
downloadsystem_core-25f1631aa765b2e6a972ff164e81ba06f8769a10.tar.gz
system_core-25f1631aa765b2e6a972ff164e81ba06f8769a10.tar.bz2
system_core-25f1631aa765b2e6a972ff164e81ba06f8769a10.zip
DO NOT MERGE ANYWHERE Add comments and code about ro.boot.slot back
Taimen bootloader passes androidboot.slot for now. This reverts commit 211a4a5d5a458b89e25f22bf364ae0b5a5da010c. Bug: 68710251 Test: taimen successfully mounts partition in first stage Change-Id: I046afc99120e7ec9ef4b8ea7a852eb70e7231ea9 Signed-off-by: Sandeep Patil <sspatil@google.com>
Diffstat (limited to 'fs_mgr')
-rw-r--r--fs_mgr/fs_mgr_slotselect.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/fs_mgr/fs_mgr_slotselect.cpp b/fs_mgr/fs_mgr_slotselect.cpp
index 33fd56240..9ca15e237 100644
--- a/fs_mgr/fs_mgr_slotselect.cpp
+++ b/fs_mgr/fs_mgr_slotselect.cpp
@@ -21,12 +21,19 @@
#include "fs_mgr.h"
#include "fs_mgr_priv.h"
-// Returns "_a" or "_b" based on androidboot.slot_suffix in kernel cmdline, or an empty string
-// if that parameter does not exist.
+// Returns "_a" or "_b" based on two possible values in kernel cmdline:
+// - androidboot.slot = a or b OR
+// - androidboot.slot_suffix = _a or _b
+// TODO: remove slot_suffix once it's deprecated.
std::string fs_mgr_get_slot_suffix() {
+ std::string slot;
std::string ab_suffix;
- fs_mgr_get_boot_config("slot_suffix", &ab_suffix);
+ if (fs_mgr_get_boot_config("slot", &slot)) {
+ ab_suffix = "_" + slot;
+ } else if (!fs_mgr_get_boot_config("slot_suffix", &ab_suffix)) {
+ ab_suffix = "";
+ }
return ab_suffix;
}