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

Commit b45d2853 authored by Yi-yo Chiang's avatar Yi-yo Chiang Committed by Automerger Merge Worker
Browse files

Merge "fs_mgr_fstab: Remove legacy DSU logic for Q first_stage_init" am:...

Merge "fs_mgr_fstab: Remove legacy DSU logic for Q first_stage_init" am: fad8eaba am: f0ccadbd am: 6928f742 am: 234f71d9

Original change: https://android-review.googlesource.com/c/platform/system/core/+/2138552



Change-Id: I25352d4ab0d07199ada6a4d656662cc20f52a3e1
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 5a622da9 234f71d9
Loading
Loading
Loading
Loading
+2 −11
Original line number Diff line number Diff line
@@ -742,22 +742,13 @@ bool ReadFstabFromFile(const std::string& path, Fstab* fstab_out) {
    }
    if (!is_proc_mounts) {
        if (!access(android::gsi::kGsiBootedIndicatorFile, F_OK)) {
            // This is expected to fail if host is android Q, since Q doesn't
            // support DSU slotting. The DSU "active" indicator file would be
            // non-existent or empty if DSU is enabled within the guest system.
            // In that case, just use the default slot name "dsu".
            std::string dsu_slot;
            if (!android::gsi::GetActiveDsu(&dsu_slot) && errno != ENOENT) {
            if (!android::gsi::GetActiveDsu(&dsu_slot)) {
                PERROR << __FUNCTION__ << "(): failed to get active DSU slot";
                return false;
            }
            if (dsu_slot.empty()) {
                dsu_slot = "dsu";
                LWARNING << __FUNCTION__ << "(): assuming default DSU slot: " << dsu_slot;
            }
            // This file is non-existent on Q vendor.
            std::string lp_names;
            if (!ReadFileToString(gsi::kGsiLpNamesFile, &lp_names) && errno != ENOENT) {
            if (!ReadFileToString(gsi::kGsiLpNamesFile, &lp_names)) {
                PERROR << __FUNCTION__ << "(): failed to read DSU LP names";
                return false;
            }