Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 62c75b16 authored by Yo Chiang's avatar Yo Chiang
Browse files

TransformFstabForDsu() skips handling special devices

Don't try to find a scratch partition in the fstab as it is a special
devices initialized by fs_mgr_overlayfs during "adb remount".
Don't hardcode the string "userdata_gsi", instead use the constant
kDsuUserdata defined in libgsi.h.

Bug: 165925766
Test: Build pass.
Test: Install and boot a DSU.
Change-Id: I4eaff9461e87e49704c976ddf2a096642957cf56
parent f536731e
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -590,7 +590,7 @@ void TransformFstabForDsu(Fstab* fstab, const std::vector<std::string>& dsu_part
    FstabEntry userdata;
    if (FstabEntry* entry = GetEntryForMountPoint(fstab, "/data")) {
        userdata = *entry;
        userdata.blk_device = "userdata_gsi";
        userdata.blk_device = android::gsi::kDsuUserdata;
        userdata.fs_mgr_flags.logical = true;
        userdata.fs_mgr_flags.formattable = true;
        if (!userdata.metadata_key_dir.empty()) {
@@ -610,7 +610,11 @@ void TransformFstabForDsu(Fstab* fstab, const std::vector<std::string>& dsu_part
            continue;
        }
        // userdata has been handled
        if (StartsWith(partition, "user")) {
        if (partition == android::gsi::kDsuUserdata) {
            continue;
        }
        // scratch is handled by fs_mgr_overlayfs
        if (partition == android::gsi::kDsuScratch) {
            continue;
        }
        // dsu_partition_name = corresponding_partition_name + kDsuPostfix