提交 32a2247b 编写于 作者: A an_xinwei 提交者: Mupceet

拆分头文件

Signed-off-by: Nan_xinwei <an_xinwei@hoperun.com>
上级 b40fcca3
......@@ -20,6 +20,7 @@
#ifdef PARAM_SUPPORT_TRIGGER
#include "cJSON.h"
#endif
#include "sys_param.h"
#ifdef __cplusplus
#if __cplusplus
extern "C" {
......@@ -108,13 +109,6 @@ int LoadPersistParams(void);
*/
int SystemWriteParam(const char *name, const char *value);
/**
* Init 接口
* 查询参数。
*
*/
int SystemReadParam(const char *name, char *value, uint32_t *len);
#ifdef PARAM_SUPPORT_TRIGGER
/**
* 对外接口
......
/*
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef BASE_STARTUP_INIT_SYS_PARAM_H
#define BASE_STARTUP_INIT_SYS_PARAM_H
#include <stdarg.h>
#include <stdint.h>
#ifdef __cplusplus
#if __cplusplus
extern "C" {
#endif
#endif
typedef struct {
uint8_t updaterMode;
void (*logFunc)(int logLevel, uint32_t domain, const char *tag, const char *fmt, va_list vargs);
int (*setfilecon)(const char *name, const char *content);
} PARAM_WORKSPACE_OPS;
int InitParamWorkSpace(int onlyRead, const PARAM_WORKSPACE_OPS *ops);
/**
* Init 接口
* 查询参数。
*
*/
int SystemReadParam(const char *name, char *value, uint32_t *len);
#ifdef __cplusplus
#if __cplusplus
}
#endif
#endif
#endif
\ No newline at end of file
......@@ -15,10 +15,7 @@
#ifndef BASE_STARTUP_PARAM_BASE_H
#define BASE_STARTUP_PARAM_BASE_H
#include <stdarg.h>
#include <stddef.h>
#include <stdint.h>
#include "sys_param.h"
#include "beget_ext.h"
#ifndef PARAM_BASE
#include "securec.h"
......@@ -30,15 +27,6 @@ extern "C" {
#endif
#endif
typedef struct {
uint8_t updaterMode;
InitCommLog logFunc;
#ifdef PARAM_SUPPORT_SELINUX
int (*setfilecon)(const char *name, const char *content);
#endif
} PARAM_WORKSPACE_OPS;
INIT_INNER_API int InitParamWorkSpace(int onlyRead, const PARAM_WORKSPACE_OPS *ops);
INIT_LOCAL_API void CloseParamWorkSpace(void);
INIT_LOCAL_API int ParamSprintf(char *buffer, size_t buffSize, const char *format, ...);
INIT_LOCAL_API int ParamMemcpy(void *dest, size_t destMax, const void *src, size_t count);
......
......@@ -128,7 +128,6 @@ INIT_LOCAL_API int GenerateKeyHasCode(const char *buff, size_t len);
INIT_INNER_API ParamWorkSpace *GetParamWorkSpace(void);
INIT_INNER_API int GetParamSecurityAuditData(const char *name, int type, ParamAuditData *auditData);
INIT_INNER_API int SysCheckParamExist(const char *name);
INIT_LOCAL_API int GetServiceCtrlInfo(const char *name, const char *value, ServiceCtrlInfo **ctrlInfo);
#ifdef STARTUP_INIT_TEST
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册