summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKeun-young Park2016-11-11 20:06:31 -0600
committerKeun-young Park2016-11-11 20:32:13 -0600
commitdd34ca45ea80c519a579578562e73d5e7f86703b (patch)
tree0c67a47e9ebc66733a723a5527cace2e6ad89ee8
parent84db3f19bce1a8d95e517423b275034c2a05d165 (diff)
downloadplatform-system-core-dd34ca45ea80c519a579578562e73d5e7f86703b.tar.gz
platform-system-core-dd34ca45ea80c519a579578562e73d5e7f86703b.tar.xz
platform-system-core-dd34ca45ea80c519a579578562e73d5e7f86703b.zip
fix swapped min / max in priority parsing
- This error led into not handling highest priority, which made zygote's priority boost no-op bug: 32718256 Test: check init log during bootup Change-Id: I959eb94912a9c1d95bfdb98ee675fdd12cf85699
-rw-r--r--init/service.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/init/service.cpp b/init/service.cpp
index 9fa11b85b..f093dd9c0 100644
--- a/init/service.cpp
+++ b/init/service.cpp
@@ -357,8 +357,8 @@ bool Service::ParseGroup(const std::vector<std::string>& args, std::string* err)
357bool Service::ParsePriority(const std::vector<std::string>& args, std::string* err) { 357bool Service::ParsePriority(const std::vector<std::string>& args, std::string* err) {
358 priority_ = 0; 358 priority_ = 0;
359 if (!ParseInt(args[1], &priority_, 359 if (!ParseInt(args[1], &priority_,
360 static_cast<int>(ANDROID_PRIORITY_LOWEST), 360 static_cast<int>(ANDROID_PRIORITY_HIGHEST), // highest is negative
361 static_cast<int>(ANDROID_PRIORITY_HIGHEST))) { 361 static_cast<int>(ANDROID_PRIORITY_LOWEST))) {
362 *err = StringPrintf("process priority value must be range %d - %d", 362 *err = StringPrintf("process priority value must be range %d - %d",
363 ANDROID_PRIORITY_HIGHEST, ANDROID_PRIORITY_LOWEST); 363 ANDROID_PRIORITY_HIGHEST, ANDROID_PRIORITY_LOWEST);
364 return false; 364 return false;