提交 fd750f0c 编写于 作者: C cheng_jinsong

add param client initialize interface

Signed-off-by: Ncheng_jinsong <chengjinsong2@huawei.com>
Change-Id: I395f284fd7034ae0e516516017a29d2f5ab202c3
上级 263aafcc
......@@ -29,6 +29,9 @@ typedef struct {
int (*setfilecon)(const char *name, const char *content);
} PARAM_WORKSPACE_OPS;
/**
* parameter service初始化接口 仅供init调用
*/
int InitParamWorkSpace(int onlyRead, const PARAM_WORKSPACE_OPS *ops);
/**
......@@ -38,6 +41,10 @@ int InitParamWorkSpace(int onlyRead, const PARAM_WORKSPACE_OPS *ops);
*/
int SystemReadParam(const char *name, char *value, uint32_t *len);
/**
* parameter client初始化接口 供服务调用
*/
void InitParameterClient(void);
#ifdef __cplusplus
#if __cplusplus
}
......
......@@ -236,3 +236,13 @@ int SystemReadParam(const char *name, char *value, uint32_t *len)
}
return ReadParamValue(handle, value, len);
}
void InitParameterClient(void)
{
if (getpid() == 1) {
return;
}
PARAM_WORKSPACE_OPS ops = {0};
ops.updaterMode = 0;
InitParamWorkSpace(1, &ops);
}
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册