提交 edac3c57 编写于 作者: X xionglei6

init: fix bugs

Signed-off-by: Nxionglei6 <xionglei6@huawei.com>
上级 483d6d73
......@@ -85,12 +85,13 @@ static void *ThreadRun(void *data)
parameterCtrl->empty = 1;
continue;
}
parameterCtrl->empty = 0;
const char *paramValue = (config->action == ACTION_ADD) ? "added" : "removed";
INIT_LOGI("[uevent] SystemSetParameter %s act %s", config->parameter, paramValue);
if (SystemSetParameter(config->parameter, paramValue) != 0) {
INIT_LOGE("[uevent] SystemSetParameter %s failed", config->parameter);
pthread_mutex_lock(&(parameterCtrl->parameterLock));
ListAddTail(&config->paramNode, &parameterCtrl->parameterList);
ListAddTail(&parameterCtrl->parameterList, &config->paramNode);
pthread_mutex_unlock(&(parameterCtrl->parameterLock));
parameterCtrl->empty = 1;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册