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

Commit a2b180ab authored by Jiyong Park's avatar Jiyong Park Committed by Gerrit Code Review
Browse files

Merge "Revert "libprocessgroup: return false on failure""

parents b37b47df c109b13b
Loading
Loading
Loading
Loading
+4 −10
Original line number Diff line number Diff line
@@ -806,7 +806,6 @@ const IProfileAttribute* TaskProfiles::GetAttribute(const std::string& name) con

bool TaskProfiles::SetProcessProfiles(uid_t uid, pid_t pid,
                                      const std::vector<std::string>& profiles, bool use_fd_cache) {
    bool success = true;
    for (const auto& name : profiles) {
        TaskProfile* profile = GetProfile(name);
        if (profile != nullptr) {
@@ -815,19 +814,16 @@ bool TaskProfiles::SetProcessProfiles(uid_t uid, pid_t pid,
            }
            if (!profile->ExecuteForProcess(uid, pid)) {
                PLOG(WARNING) << "Failed to apply " << name << " process profile";
                success = false;
            }
        } else {
            PLOG(WARNING) << "Failed to find " << name << "process profile";
            success = false;
        }
    }
    return success;
    return true;
}

bool TaskProfiles::SetTaskProfiles(int tid, const std::vector<std::string>& profiles,
                                   bool use_fd_cache) {
    bool success = true;
    for (const auto& name : profiles) {
        TaskProfile* profile = GetProfile(name);
        if (profile != nullptr) {
@@ -836,12 +832,10 @@ bool TaskProfiles::SetTaskProfiles(int tid, const std::vector<std::string>& prof
            }
            if (!profile->ExecuteForTask(tid)) {
                PLOG(WARNING) << "Failed to apply " << name << " task profile";
                success = false;
            }
        } else {
            PLOG(WARNING) << "Failed to find " << name << "task profile";
            success = false;
        }
    }
    return success;
    return true;
}