Home
last modified time | relevance | path

Searched refs:ops (Results 1 – 25 of 33) sorted by relevance

12

/base/hiviewdfx/blackbox/
Dblackbox_core.c41 struct ModuleOps ops; member
147 struct BBoxOps *ops = NULL; in SaveErrorLog() local
163 UTILS_DL_LIST_FOR_EACH_ENTRY(ops, &g_opsList, struct BBoxOps, opsList) { in SaveErrorLog()
164 if (ops == NULL) { in SaveErrorLog()
167 if (ops->ops.GetLastLogInfo != NULL && ops->ops.SaveLastLog != NULL) { in SaveErrorLog()
169 if (ops->ops.GetLastLogInfo(info) != 0) { in SaveErrorLog()
171 ops->ops.module); in SaveErrorLog()
174 BBOX_PRINT_INFO("[%s] starts saving log!\n", ops->ops.module); in SaveErrorLog()
175 if (ops->ops.SaveLastLog(dirName, info) != 0) { in SaveErrorLog()
176 BBOX_PRINT_ERR("[%s] failed to save log!\n", ops->ops.module); in SaveErrorLog()
[all …]
Dblackbox_adapter.c78 struct ModuleOps ops = { in BBoxTest() local
86 if (BBoxRegisterModuleOps(&ops) != 0) { in BBoxTest()
96 struct ModuleOps ops = { in BBoxAdapterInit() local
104 if (BBoxRegisterModuleOps(&ops) != 0) { in BBoxAdapterInit()
/base/startup/init/services/param/liteos/
Dparam_litedac.c67 INIT_LOCAL_API int RegisterSecurityDacOps(ParamSecurityOps *ops, int isInit) in RegisterSecurityDacOps() argument
69 PARAM_CHECK(ops != NULL, return -1, "Invalid param"); in RegisterSecurityDacOps()
71 int ret = strcpy_s(ops->name, sizeof(ops->name), "dac"); in RegisterSecurityDacOps()
72 ops->securityGetLabel = NULL; in RegisterSecurityDacOps()
73 ops->securityInitLabel = InitLocalSecurityLabel; in RegisterSecurityDacOps()
74 ops->securityCheckFilePermission = CheckFilePermission; in RegisterSecurityDacOps()
75 ops->securityCheckParamPermission = DacCheckParamPermission; in RegisterSecurityDacOps()
76 ops->securityFreeLabel = FreeLocalSecurityLabel; in RegisterSecurityDacOps()
78 ops->securityGetLabel = DacGetParamSecurityLabel; in RegisterSecurityDacOps()
Dparam_hal.c239 int RegisterPersistParamOps(PersistParamOps *ops) in RegisterPersistParamOps() argument
242 PARAM_CHECK(ops != NULL, return -1, "Invalid ops"); in RegisterPersistParamOps()
243 ops->save = SavePersistParam; in RegisterPersistParamOps()
244 ops->load = LoadPersistParam; in RegisterPersistParamOps()
245 ops->batchSaveBegin = BatchSavePersistParamBegin; in RegisterPersistParamOps()
246 ops->batchSave = BatchSavePersistParam; in RegisterPersistParamOps()
247 ops->batchSaveEnd = BatchSavePersistParamEnd; in RegisterPersistParamOps()
/base/startup/hvb/libhvb/include/
Dhvb_ops.h40 enum hvb_io_errno (*read_partition)(struct hvb_ops *ops, const char *ptn, int64_t offset,
42 enum hvb_io_errno (*write_partition)(struct hvb_ops *ops, const char *ptn, int64_t offset,
44 enum hvb_io_errno (*valid_rvt_key)(struct hvb_ops *ops, const uint8_t *pubkey,
47 enum hvb_io_errno (*read_rollback)(struct hvb_ops *ops,
50 enum hvb_io_errno (*write_rollback)(struct hvb_ops *ops, uint64_t rollback_index_location,
52 enum hvb_io_errno (*read_lock_state)(struct hvb_ops *ops, bool *lock_state);
53 … enum hvb_io_errno (*get_partiton_size)(struct hvb_ops *ops, const char *ptn, uint64_t *out_bytes);
Dhvb_cmdline.h35 enum hvb_errno hvb_creat_cmdline(struct hvb_ops *ops, struct hvb_verified_data *vd);
Dhvb_footer.h42 enum hvb_errno footer_init_desc(struct hvb_ops *ops, const char *ptn, const char *const *hash_ptn_l…
/base/startup/hvb/libhvb/src/footer/
Dhvb_footer.c47 static enum hvb_errno _load_and_parse_footer(struct hvb_ops *ops, struct hvb_footer *footer, const … in _load_and_parse_footer() argument
55 …io_ret = ops->read_partition(ops, ptn, -HVB_FOOTER_SIZE, HVB_FOOTER_SIZE, footer_buf.addr, &read_b… in _load_and_parse_footer()
75 static enum hvb_errno _load_cert(struct hvb_ops *ops, struct hvb_buf *cert, const char *ptn, struct… in _load_cert() argument
81 io_ret = ops->read_partition(ops, ptn, offset, cert->size, cert->addr, &read_bytes); in _load_cert()
95 enum hvb_errno footer_init_desc(struct hvb_ops *ops, const char *ptn, const char *const *hash_ptn_l… in footer_init_desc() argument
103 ret = _load_and_parse_footer(ops, &footer, ptn); in footer_init_desc()
114 ret = _load_cert(ops, &cert_buf, ptn, &footer); in footer_init_desc()
118 ret = cert_init_desc(ops, ptn, &cert_buf, hash_ptn_list, out_pubk, vd); in footer_init_desc()
/base/startup/init/services/param/adapter/
Dparam_selinux.c40 …const char *libname = (GetParamWorkSpace()->ops.updaterMode == 1) ? CHECKER_UPDATER_LIB_NAME : CHE… in InitSelinuxOpsForInit()
118 PARAM_CHECK(GetParamWorkSpace() != NULL && GetParamWorkSpace()->ops.setfilecon != NULL, in SetSelinuxFileCon()
125 if (GetParamWorkSpace()->ops.setfilecon(buffer, context) < 0) { in SetSelinuxFileCon()
310 INIT_LOCAL_API int RegisterSecuritySelinuxOps(ParamSecurityOps *ops, int isInit) in RegisterSecuritySelinuxOps() argument
313 PARAM_CHECK(ops != NULL, return -1, "Invalid param"); in RegisterSecuritySelinuxOps()
314 int ret = ParamStrCpy(ops->name, sizeof(ops->name), "selinux"); in RegisterSecuritySelinuxOps()
315 ops->securityGetLabel = NULL; in RegisterSecuritySelinuxOps()
316 ops->securityInitLabel = InitLocalSecurityLabel; in RegisterSecuritySelinuxOps()
317 ops->securityCheckFilePermission = CheckFilePermission; in RegisterSecuritySelinuxOps()
318 if (GetParamWorkSpace()->ops.updaterMode == 1) { in RegisterSecuritySelinuxOps()
[all …]
Dparam_persistadp.c125 int RegisterPersistParamOps(PersistParamOps *ops) in RegisterPersistParamOps() argument
128 PARAM_CHECK(ops != NULL, return -1, "Invalid ops"); in RegisterPersistParamOps()
129 ops->save = SavePersistParam; in RegisterPersistParamOps()
130 ops->load = LoadPersistParam; in RegisterPersistParamOps()
131 ops->batchSaveBegin = BatchSavePersistParamBegin; in RegisterPersistParamOps()
132 ops->batchSave = BatchSavePersistParam; in RegisterPersistParamOps()
133 ops->batchSaveEnd = BatchSavePersistParamEnd; in RegisterPersistParamOps()
Dparam_dac.c282 INIT_LOCAL_API int RegisterSecurityDacOps(ParamSecurityOps *ops, int isInit) in RegisterSecurityDacOps() argument
284 PARAM_CHECK(ops != NULL, return -1, "Invalid param"); in RegisterSecurityDacOps()
286 int ret = ParamStrCpy(ops->name, sizeof(ops->name), "dac"); in RegisterSecurityDacOps()
287 ops->securityInitLabel = InitLocalSecurityLabel; in RegisterSecurityDacOps()
288 ops->securityCheckFilePermission = CheckFilePermission; in RegisterSecurityDacOps()
289 ops->securityCheckParamPermission = DacCheckParamPermission; in RegisterSecurityDacOps()
290 ops->securityFreeLabel = FreeLocalSecurityLabel; in RegisterSecurityDacOps()
292 ops->securityGetLabel = DacGetParamSecurityLabel; in RegisterSecurityDacOps()
/base/startup/init/interfaces/innerkits/fs_manager/libfs_hvb/
Dhvb_ops.c44 static enum hvb_io_errno HvbReadFromPartition(struct hvb_ops* ops, in HvbReadFromPartition() argument
131 static enum hvb_io_errno HvbWriteToPartition(struct hvb_ops* ops, in HvbWriteToPartition() argument
139 static enum hvb_io_errno HvbInvaldateKey(struct hvb_ops* ops, in HvbInvaldateKey() argument
155 static enum hvb_io_errno HvbReadRollbackIdx(struct hvb_ops* ops, in HvbReadRollbackIdx() argument
169 static enum hvb_io_errno HvbWriteRollbackIdx(struct hvb_ops* ops, in HvbWriteRollbackIdx() argument
176 static enum hvb_io_errno HvbReadLockState(struct hvb_ops* ops, in HvbReadLockState() argument
182 static enum hvb_io_errno HvbGetSizeOfPartition(struct hvb_ops* ops, in HvbGetSizeOfPartition() argument
/base/startup/hvb/libhvb/src/auth/
Dhvb.c70 static enum hvb_errno hvb_rvt_verify_root(struct hvb_ops *ops, const char *ptn, in hvb_rvt_verify_root() argument
79 ret = footer_init_desc(ops, ptn, ptn_list, &cert_pubk, vd); in hvb_rvt_verify_root()
85 io_ret = ops->valid_rvt_key(ops, cert_pubk.addr, cert_pubk.size, NULL, 0, &is_trusted); in hvb_rvt_verify_root()
121 static enum hvb_errno hvb_walk_verify_nodes(struct hvb_ops *ops, const char *const *ptn_list, in hvb_walk_verify_nodes() argument
158 ret = footer_init_desc(ops, &desc.name[0], ptn_list, &cert_pubk, vd); in hvb_walk_verify_nodes()
212 enum hvb_errno hvb_chain_verify(struct hvb_ops *ops, in hvb_chain_verify() argument
226 hvb_return_hvb_err_if_null(ops); in hvb_chain_verify()
244 ret = hvb_rvt_verify_root(ops, rvt_ptn, ptn_list, vd); in hvb_chain_verify()
259 ret = hvb_walk_verify_nodes(ops, ptn_list, rvt_image, vd); in hvb_chain_verify()
266 ret = hvb_creat_cmdline(ops, vd); in hvb_chain_verify()
/base/startup/hvb/test/
Dhvb_main.c32 static enum hvb_io_errno hvb_read_partition(struct hvb_ops *ops, in hvb_read_partition() argument
93 static enum hvb_io_errno hvb_write_partition(struct hvb_ops *ops, in hvb_write_partition() argument
140 static enum hvb_io_errno hvb_read_rollback(struct hvb_ops *ops, in hvb_read_rollback() argument
151 static enum hvb_io_errno hvb_write_rollback(struct hvb_ops *ops, in hvb_write_rollback() argument
158 static enum hvb_io_errno hvb_get_partiton_uuid(struct hvb_ops *ops, in hvb_get_partiton_uuid() argument
170 static enum hvb_io_errno hvb_get_partiton_size(struct hvb_ops *ops, in hvb_get_partiton_size() argument
/base/startup/init/services/param/base/
Dparam_base.c101 static int CheckNeedInit(int onlyRead, const PARAM_WORKSPACE_OPS *ops) in CheckNeedInit() argument
103 if (ops != NULL) { in CheckNeedInit()
104 g_paramWorkSpace.ops.updaterMode = ops->updaterMode; in CheckNeedInit()
105 if (g_paramWorkSpace.ops.logFunc == NULL) { in CheckNeedInit()
106 g_paramWorkSpace.ops.logFunc = ops->logFunc; in CheckNeedInit()
109 g_paramWorkSpace.ops.setfilecon = ops->setfilecon; in CheckNeedInit()
139 INIT_INNER_API int InitParamWorkSpace(int onlyRead, const PARAM_WORKSPACE_OPS *ops) in InitParamWorkSpace() argument
141 if (CheckNeedInit(onlyRead, ops) == 0) { in InitParamWorkSpace()
210 if (g_paramWorkSpace.ops.logFunc != NULL) { in ParamWorBaseLog()
213 g_paramWorkSpace.ops.logFunc(logLevel, domain, tag, fmt, vargs); in ParamWorBaseLog()
[all …]
/base/startup/init/services/param/include/
Dparam_security.h96 typedef int (*RegisterSecurityOpsPtr)(ParamSecurityOps *ops, int isInit);
110 INIT_LOCAL_API int RegisterSecuritySelinuxOps(ParamSecurityOps *ops, int isInit);
115 INIT_LOCAL_API int RegisterSecurityDacOps(ParamSecurityOps *ops, int isInit);
Dparam_persist.h44 int RegisterPersistParamOps(PersistParamOps *ops);
/base/startup/hvb/libhvb/src/cert/
Dhvb_cert.c95 static enum hvb_errno hash_image_init_desc(struct hvb_ops *ops, const char *ptn, in hash_image_init_desc() argument
120 io_ret = ops->read_partition(ops, ptn, 0, image_buf.size, image_buf.addr, &read_bytes); in hash_image_init_desc()
354 static enum hvb_errno _check_rollback_index(struct hvb_ops *ops, struct hvb_cert *cert, struct hvb_… in _check_rollback_index() argument
366 io_ret = ops->read_rollback(ops, rollback_location, &stored_rollback_index); in _check_rollback_index()
382 enum hvb_errno cert_init_desc(struct hvb_ops *ops, const char *ptn, struct hvb_buf *cert_buf, in cert_init_desc() argument
405 ret = _check_rollback_index(ops, &cert, vd); in cert_init_desc()
411 ret = hash_image_init_desc(ops, ptn, &cert, hash_ptn_list, vd); in cert_init_desc()
/base/telephony/ril_adapter/services/hril_hdf/src/
Dhril_hdf.c127 const HRilOps *ops = NULL; in LoadVendor() local
156 ops = rilInitOps(&g_reportOps); in LoadVendor()
157 HRilRegOps(ops); in LoadVendor()
/base/startup/hvb/libhvb/src/cmdline/
Dhvb_cmdline.c102 enum hvb_errno hvb_creat_cmdline(struct hvb_ops *ops, struct hvb_verified_data *vd) in hvb_creat_cmdline() argument
116 io_ret = ops->read_lock_state(ops, &device_locked); in hvb_creat_cmdline()
/base/startup/init/services/param/linux/
Dparam_request.c43 PARAM_WORKSPACE_OPS ops = {0}; in ParameterInit() local
44 ops.updaterMode = 0; in ParameterInit()
45 ops.logFunc = InitLog; in ParameterInit()
47 ops.setfilecon = NULL; in ParameterInit()
49 InitParamWorkSpace(1, &ops); in ParameterInit()
Dparam_service.c366 ParamSecurityOps *ops = GetParamSecurityOps(PARAM_SECURITY_SELINUX); in LoadSelinuxLabel() local
367 if (ops != NULL && ops->securityGetLabel != NULL) { in LoadSelinuxLabel()
368 ops->securityGetLabel(NULL); in LoadSelinuxLabel()
379 PARAM_WORKSPACE_OPS ops = {0}; in InitParamService() local
380 ops.updaterMode = InUpdaterMode(); in InitParamService()
382 ops.logFunc = InitLog; in InitParamService()
384 ops.setfilecon = setfilecon; in InitParamService()
386 int ret = InitParamWorkSpace(0, &ops); in InitParamService()
/base/startup/init/services/param/manager/
Dparam_manager.c91 ParamSecurityOps *ops = GetParamSecurityOps(PARAM_SECURITY_SELINUX); in SystemTraversalParameter() local
92 if (ops != NULL && ops->securityGetLabel != NULL) { in SystemTraversalParameter()
93 ops->securityGetLabel(NULL); in SystemTraversalParameter()
189 ParamSecurityOps *ops = GetParamSecurityOps(PARAM_SECURITY_SELINUX); in SystemDumpParameters() local
190 if (ops != NULL && ops->securityGetLabel != NULL) { in SystemDumpParameters()
191 ops->securityGetLabel(NULL); in SystemDumpParameters()
Dparam_server.c29 ParamSecurityOps *ops = GetParamSecurityOps(PARAM_SECURITY_DAC); in LoadSecurityLabel() local
30 if (ops != NULL && ops->securityGetLabel != NULL) { in LoadSecurityLabel()
31 ops->securityGetLabel(fileName); in LoadSecurityLabel()
/base/startup/init/test/unittest/param/
Dselinux_unittest.cpp140 uint8_t updataMode = GetParamWorkSpace()->ops.updaterMode; in TestClientSelinuxCheckParaPermissionRead()
141 GetParamWorkSpace()->ops.updaterMode = 1; // 1 test updater mode in TestClientSelinuxCheckParaPermissionRead()
146 GetParamWorkSpace()->ops.updaterMode = updataMode; in TestClientSelinuxCheckParaPermissionRead()

12