提交 2cf8776c 编写于 作者: M Mupceet

fix bug for log

Signed-off-by: NMupceet <laiguizhong@huawei.com>
上级 e8a8502c
......@@ -164,10 +164,10 @@ static int SelinuxReadParamCheck(const char *name)
if (label == NULL) { // open file with readonly
ret = AddWorkSpace(WORKSPACE_NAME_DEF_SELINUX, 1, PARAM_WORKSPACE_MAX);
} else {
PARAM_LOGI("SelinuxReadParamCheck name %s label %s", name, label);
ret = AddWorkSpace(label, 1, PARAM_WORKSPACE_MAX);
}
if (ret != 0) {
PARAM_LOGV("SelinuxReadParamCheck name %s label %s ", name, label);
return DAC_RESULT_FORBIDED;
}
return DAC_RESULT_PERMISSION;
......
......@@ -129,7 +129,7 @@ int32_t WatcherManagerKits::AddWatcher(const std::string &keyPrefix, ParameterCh
{
WATCHER_LOGI("AddWatcher keyPrefix %s", keyPrefix.c_str());
ParamWatcherKitPtr watcher = GetParamWatcher(keyPrefix);
WATCHER_CHECK(watcher == nullptr, return watcher->GetWatcherId(),
WATCHER_CHECK(watcher == nullptr, return -1,
"Has been watched by keyPrefix %s", keyPrefix.c_str());
watcher = new ParamWatcher(keyPrefix, callback, context);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册