mirror of
https://gitee.com/openharmony/startup_init
synced 2025-03-03 18:17:51 +00:00
add param client initialize interface
Signed-off-by: cheng_jinsong <chengjinsong2@huawei.com> Change-Id: I395f284fd7034ae0e516516017a29d2f5ab202c3
This commit is contained in:
parent
263aafccd8
commit
fd750f0c64
@ -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);
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user