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

Commit ab6e48ef authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 7310088 from 7bb420d7 to sc-v2-release

Change-Id: I2c54fb159f4fc061aea1cdda799dde8cb29fadd5
parents d395c639 7bb420d7
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -116,6 +116,8 @@ namespace fs_mgr {
void MapScratchPartitionIfNeeded(Fstab*, const std::function<bool(const std::set<std::string>&)>&) {
}

void CleanupOldScratchFiles() {}

void TeardownAllOverlayForMountPoint(const std::string&) {}

}  // namespace fs_mgr
+3 −1
Original line number Diff line number Diff line
@@ -95,7 +95,9 @@ void DmTargetVerity::UseFec(const std::string& device, uint32_t num_roots, uint3
}

void DmTargetVerity::SetVerityMode(const std::string& mode) {
    if (mode != "restart_on_corruption" && mode != "ignore_corruption") {
    if (mode != "panic_on_corruption" &&
        mode != "restart_on_corruption" &&
        mode != "ignore_corruption") {
        LOG(ERROR) << "Unknown verity mode: " << mode;
        valid_ = false;
        return;
+3 −1
Original line number Diff line number Diff line
@@ -61,7 +61,9 @@ bool ConstructVerityTable(const FsAvbHashtreeDescriptor& hashtree_desc,

    // Converts veritymode to the format used in kernel.
    std::string dm_verity_mode;
    if (verity_mode == "enforcing") {
    if (verity_mode == "panicking") {
        dm_verity_mode = "panic_on_corruption";
    } else if (verity_mode == "enforcing") {
        dm_verity_mode = "restart_on_corruption";
    } else if (verity_mode == "logging") {
        dm_verity_mode = "ignore_corruption";
+15 −3
Original line number Diff line number Diff line
@@ -453,7 +453,19 @@ static UmountStat TryUmountAndFsck(unsigned int cmd, bool run_fsck,
#define ZRAM_DEVICE       "/dev/block/zram0"
#define ZRAM_RESET        "/sys/block/zram0/reset"
#define ZRAM_BACK_DEV     "/sys/block/zram0/backing_dev"
#define ZRAM_INITSTATE    "/sys/block/zram0/initstate"
static Result<void> KillZramBackingDevice() {
    std::string zram_initstate;
    if (!android::base::ReadFileToString(ZRAM_INITSTATE, &zram_initstate)) {
        return ErrnoError() << "Failed to read " << ZRAM_INITSTATE;
    }

    zram_initstate.erase(zram_initstate.length() - 1);
    if (zram_initstate == "0") {
        LOG(INFO) << "Zram has not been swapped on";
        return {};
    }

    if (access(ZRAM_BACK_DEV, F_OK) != 0 && errno == ENOENT) {
        LOG(INFO) << "No zram backing device configured";
        return {};
+2 −1
Original line number Diff line number Diff line
@@ -11,5 +11,6 @@ on early-init && property:ro.product.debugfs_restrictions.enabled=true
    mount debugfs debugfs /sys/kernel/debug
    chmod 0755 /sys/kernel/debug

on property:sys.boot_completed=1 && property:ro.product.debugfs_restrictions.enabled=true
on property:sys.boot_completed=1 && property:ro.product.debugfs_restrictions.enabled=true && \
   property:persist.dbg.keep_debugfs_mounted=""
   umount /sys/kernel/debug