From: Chanwoo Choi Date: Fri, 9 Jun 2017 06:50:04 +0000 (+0900) Subject: pass: pmqos: Specify the resource name on log message X-Git-Tag: accepted/tizen/unified/20170615.020700~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F97%2F133197%2F1;p=platform%2Fcore%2Fsystem%2Fpass.git pass: pmqos: Specify the resource name on log message This patch just adds the correct resource name to pmqos's log message in order to improve the readability of pmqos's operation. Example, - Before: "cannot support 'AppLaunch' scenario (support=0)" - After : "cannot support 'AppLaunch' scenario for 'cpu0' resource" Change-Id: Ie337e73a5b310fc72428a7bfce1d5690f07a2863 Signed-off-by: Chanwoo Choi --- diff --git a/src/pass/pass-pmqos.c b/src/pass/pass-pmqos.c index 3929dff..e2dcbbb 100644 --- a/src/pass/pass-pmqos.c +++ b/src/pass/pass-pmqos.c @@ -120,15 +120,16 @@ int pass_notifier_pmqos_func(struct pass_policy *policy, void *data) locked = is_pmqos_locked(data, name); index = find_scenario_index(scenario, name); if (index < 0) { - _W("Unknown scenario (%s)\n", data); + _W("Unknown scenario (%s) for '%s' resource\n", + data, cdata->res_name); return -EINVAL; } scn = &scenario->list[index]; /* Check the state of each scenario whether to support or not */ if (scn->state != PASS_ON) { - _W("cannot support '%s' scenario (support=%d)\n", - name, scn->state); + _W("cannot support '%s' scenario for '%s' resource\n", + name, cdata->res_name); return 0; } @@ -137,8 +138,9 @@ int pass_notifier_pmqos_func(struct pass_policy *policy, void *data) * if state is same as existing state */ if (scn->locked == locked) { - _E("'%s' scenario is already %s\n", - name, locked ? "Locked" : "Unlocked"); + _E("'%s' scenario is already %s for '%s' resource\n", + name, locked ? "Locked" : "Unlocked", + cdata->res_name); return 0; } scn->locked = locked;