Merge changes I8a2764a6,I6e8b9d63,I6e041dfc am: 6079d30145 am: c7714c5763
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2044690 Change-Id: Ie08d57f083086b52c28f58a241d0a4d5f19059af Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
commit
bd20e92e98
2 changed files with 8 additions and 3 deletions
|
|
@ -147,12 +147,17 @@ static bool Mkdir(const std::string& path, mode_t mode, const std::string& uid,
|
|||
static void MergeCgroupToDescriptors(std::map<std::string, CgroupDescriptor>* descriptors,
|
||||
const Json::Value& cgroup, const std::string& name,
|
||||
const std::string& root_path, int cgroups_version) {
|
||||
const std::string cgroup_path = cgroup["Path"].asString();
|
||||
std::string path;
|
||||
|
||||
if (!root_path.empty()) {
|
||||
path = root_path + "/" + cgroup["Path"].asString();
|
||||
path = root_path;
|
||||
if (cgroup_path != ".") {
|
||||
path += "/";
|
||||
path += cgroup_path;
|
||||
}
|
||||
} else {
|
||||
path = cgroup["Path"].asString();
|
||||
path = cgroup_path;
|
||||
}
|
||||
|
||||
uint32_t controller_flags = 0;
|
||||
|
|
|
|||
|
|
@ -207,7 +207,7 @@ bool SetAttributeAction::ExecuteForTask(int tid) const {
|
|||
}
|
||||
|
||||
if (!WriteStringToFile(value_, path)) {
|
||||
if (errno == ENOENT) {
|
||||
if (access(path.c_str(), F_OK) < 0) {
|
||||
if (optional_) {
|
||||
return true;
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue