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

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

Snap for 5563067 from 83e9f6bd to qt-release

Change-Id: I8cbdd7bb0fa2ba6e99765e0ca4428e44224134b6
parents 90f90a52 83e9f6bd
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -295,9 +295,15 @@ struct UsbFfsConnection : public Connection {
                }

                struct usb_functionfs_event event;
                if (TEMP_FAILURE_RETRY(adb_read(control_fd_.get(), &event, sizeof(event))) !=
                    sizeof(event)) {
                rc = TEMP_FAILURE_RETRY(adb_read(control_fd_.get(), &event, sizeof(event)));
                if (rc == -1) {
                    PLOG(FATAL) << "failed to read functionfs event";
                } else if (rc == 0) {
                    LOG(WARNING) << "hit EOF on functionfs control fd";
                    break;
                } else if (rc != sizeof(event)) {
                    LOG(FATAL) << "read functionfs event of unexpected size, expected "
                               << sizeof(event) << ", got " << rc;
                }

                LOG(INFO) << "USB event: "
+1 −1
Original line number Diff line number Diff line
@@ -390,7 +390,7 @@ static void tune_quota(const std::string& blk_device, const FstabEntry& entry,
// Set the number of reserved filesystem blocks if needed.
static void tune_reserved_size(const std::string& blk_device, const FstabEntry& entry,
                               const struct ext4_super_block* sb, int* fs_stat) {
    if (entry.reserved_size != 0) {
    if (entry.reserved_size == 0) {
        return;
    }

+2 −0
Original line number Diff line number Diff line
@@ -704,7 +704,9 @@ bool SkipMountingPartitions(Fstab* fstab) {
    constexpr const char kSkipMountConfig[] = "/system/etc/init/config/skip_mount.cfg";

    std::string skip_config;
    auto save_errno = errno;
    if (!ReadFileToString(kSkipMountConfig, &skip_config)) {
        errno = save_errno;  // missing file is expected
        return true;
    }

+7 −1
Original line number Diff line number Diff line
@@ -139,7 +139,11 @@ bool fs_mgr_filesystem_has_space(const std::string& mount_point) {
    // If we have access issues to find out space remaining, return true
    // to prevent us trying to override with overlayfs.
    struct statvfs vst;
    if (statvfs(mount_point.c_str(), &vst)) return true;
    auto save_errno = errno;
    if (statvfs(mount_point.c_str(), &vst)) {
        errno = save_errno;
        return true;
    }

    static constexpr int kPercentThreshold = 1;  // 1%

@@ -265,9 +269,11 @@ bool fs_mgr_rw_access(const std::string& path) {

bool fs_mgr_overlayfs_already_mounted(const std::string& mount_point, bool overlay_only = true) {
    Fstab fstab;
    auto save_errno = errno;
    if (!ReadFstabFromFile("/proc/mounts", &fstab)) {
        return false;
    }
    errno = save_errno;
    const auto lowerdir = kLowerdirOption + mount_point;
    for (const auto& entry : fstab) {
        if (overlay_only && "overlay" != entry.fs_type && "overlayfs" != entry.fs_type) continue;