mirror of
https://gitee.com/openharmony/startup_init
synced 2024-12-02 16:06:31 +00:00
恢复接口LoadParamsFile
Signed-off-by: chengjinsong2 <chengjinsong2@huawei.com>
This commit is contained in:
parent
3d7dded0e6
commit
fdeecb61f1
@ -34,6 +34,8 @@ int SystemWriteParam(const char *name, const char *value);
|
||||
|
||||
int SystemReadParam(const char *name, char *value, unsigned int *len);
|
||||
|
||||
int LoadParamsFile(const char *fileName, bool onlyAdd);
|
||||
|
||||
typedef int (*CmdExecutor)(int id, const char *name, int argc, const char **argv);
|
||||
|
||||
int AddCmdExecutor(const char *cmdName, CmdExecutor execCmd);
|
||||
|
@ -1,6 +1,7 @@
|
||||
[
|
||||
{ "name": "SystemWriteParam" },
|
||||
{ "name": "SystemReadParam" },
|
||||
{ "name": "LoadParamsFile" },
|
||||
{ "name": "SplitString" },
|
||||
{ "name": "AddCmdExecutor" },
|
||||
{ "name": "RemoveCmdExecutor" },
|
||||
|
@ -192,6 +192,11 @@ static int ProcessParamFile(const char *fileName, void *context)
|
||||
return LoadDefaultParam_(fileName, mode, exclude, ARRAY_LENGTH(exclude), LoadOneParam_);
|
||||
}
|
||||
|
||||
int LoadParamsFile(const char *fileName, bool onlyAdd)
|
||||
{
|
||||
return LoadDefaultParams(fileName, onlyAdd ? LOAD_PARAM_ONLY_ADD : LOAD_PARAM_NORMAL);
|
||||
}
|
||||
|
||||
int LoadDefaultParams(const char *fileName, uint32_t mode)
|
||||
{
|
||||
PARAM_CHECK(fileName != NULL, return -1, "Invalid filename for load");
|
||||
|
Loading…
Reference in New Issue
Block a user