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

Commit e2dd9357 authored by Yi-Yo Chiang's avatar Yi-Yo Chiang Committed by Automerger Merge Worker
Browse files

fs_mgr_overlayfs_mount_fstab_entry(): Rename source device name am: a38c89a2

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

Change-Id: Idd63c31d957c69372230e6a75b3309bc20edd625
parents f75a8ead a38c89a2
Loading
Loading
Loading
Loading
+9 −7
Original line number Diff line number Diff line
@@ -1310,13 +1310,15 @@ bool fs_mgr_overlayfs_mount_fstab_entry(const android::fs_mgr::FstabEntry& entry
        options += ",override_creds=off";
    }

    // Use .blk_device as the mount() source for debugging purposes.
    // Overlayfs is pseudo filesystem, so the source device is a symbolic value and isn't used to
    // back the filesystem. /proc/mounts would show the source as the device name of the mount.
    auto report = "__mount(source=" + entry.blk_device + ",target=" + entry.mount_point +
                  ",type=overlay," + options + ")=";
    auto ret = mount(entry.blk_device.c_str(), entry.mount_point.c_str(), "overlay",
                     MS_RDONLY | MS_NOATIME, options.c_str());
    // Use "overlay-" + entry.blk_device as the mount() source, so that adb-remout-test don't
    // confuse this with adb remount overlay, whose device name is "overlay".
    // Overlayfs is a pseudo filesystem, so the source device is a symbolic value and isn't used to
    // back the filesystem. However the device name would be shown in /proc/mounts.
    auto source = "overlay-" + entry.blk_device;
    auto report = "__mount(source=" + source + ",target=" + entry.mount_point + ",type=overlay," +
                  options + ")=";
    auto ret = mount(source.c_str(), entry.mount_point.c_str(), "overlay", MS_RDONLY | MS_NOATIME,
                     options.c_str());
    if (ret) {
        PERROR << report << ret;
        return false;