From 0b0ee7af2f43776f08a4d560f59b9fbc1267b83b Mon Sep 17 00:00:00 2001 From: David Anderson Date: Thu, 18 Apr 2019 14:14:33 -0700 Subject: [PATCH] Don't assume an A/B device when overriding the super partition name. Bug: 130750333 Test: launch cuttlefish with DAP enabled Change-Id: I1ea309d448866a8914f58be98d860eca36d47062 --- fs_mgr/fs_mgr.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/fs_mgr/fs_mgr.cpp b/fs_mgr/fs_mgr.cpp index 5114f5517..c1aafdac9 100644 --- a/fs_mgr/fs_mgr.cpp +++ b/fs_mgr/fs_mgr.cpp @@ -1695,11 +1695,12 @@ bool fs_mgr_verity_is_check_at_most_once(const android::fs_mgr::FstabEntry& entr std::string fs_mgr_get_super_partition_name(int slot) { // Devices upgrading to dynamic partitions are allowed to specify a super - // partition name, assumed to be A/B (non-A/B retrofit is not supported). - // For devices launching with dynamic partition support, the partition - // name must be "super". + // partition name. This includes cuttlefish, which is a non-A/B device. std::string super_partition; if (fs_mgr_get_boot_config_from_kernel_cmdline("super_partition", &super_partition)) { + if (fs_mgr_get_slot_suffix().empty()) { + return super_partition; + } std::string suffix; if (slot == 0) { suffix = "_a";