Home
last modified time | relevance | path

Searched refs:ops (Results 1 - 25 of 42) sorted by relevance

12

/base/hiviewdfx/blackbox_lite/
H A 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 in SaveErrorLog()
206 BBoxRegisterModuleOps(struct ModuleOps *ops) BBoxRegisterModuleOps() argument
258 struct BBoxOps *ops = NULL; BBoxNotifyError() local
[all...]
H A 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/hvb/libhvb/include/
H A 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);
H A Dhvb_cmdline.h35 enum hvb_errno hvb_creat_cmdline(struct hvb_ops *ops, struct hvb_verified_data *vd);
H A Dhvb_footer.h42 enum hvb_errno footer_init_desc(struct hvb_ops *ops, const char *ptn, const char *const *hash_ptn_list,
/base/startup/init/services/param/liteos/
H A Dparam_litedac.c69 INIT_LOCAL_API int RegisterSecurityDacOps(ParamSecurityOps *ops, int isInit) in RegisterSecurityDacOps() argument
71 PARAM_CHECK(ops != NULL, return -1, "Invalid param"); in RegisterSecurityDacOps()
73 int ret = strcpy_s(ops->name, sizeof(ops->name), "dac"); in RegisterSecurityDacOps()
74 ops->securityGetLabel = NULL; in RegisterSecurityDacOps()
75 ops->securityInitLabel = InitLocalSecurityLabel; in RegisterSecurityDacOps()
76 ops->securityCheckFilePermission = CheckFilePermission; in RegisterSecurityDacOps()
77 ops->securityCheckParamPermission = LiteDacCheckParamPermission; in RegisterSecurityDacOps()
78 ops->securityFreeLabel = FreeLocalSecurityLabel; in RegisterSecurityDacOps()
80 ops in RegisterSecurityDacOps()
[all...]
H A 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()
H A Dparam_hal.c240 int RegisterPersistParamOps(PersistParamOps *ops) in RegisterPersistParamOps() argument
243 PARAM_CHECK(ops != NULL, return -1, "Invalid ops"); in RegisterPersistParamOps()
244 ops->save = SavePersistParam; in RegisterPersistParamOps()
245 ops->load = LoadPersistParam; in RegisterPersistParamOps()
246 ops->batchSaveBegin = BatchSavePersistParamBegin; in RegisterPersistParamOps()
247 ops->batchSave = BatchSavePersistParam; in RegisterPersistParamOps()
248 ops->batchSaveEnd = BatchSavePersistParamEnd; in RegisterPersistParamOps()
/base/startup/hvb/libhvb/src/utils/
H A Dhvb_util.c132 enum hvb_errno check_hvb_ops(struct hvb_ops *ops) in check_hvb_ops() argument
134 hvb_return_hvb_err_if_null(ops); in check_hvb_ops()
135 hvb_return_hvb_err_if_null(ops->user_data); in check_hvb_ops()
136 hvb_return_hvb_err_if_null(ops->read_partition); in check_hvb_ops()
137 hvb_return_hvb_err_if_null(ops->write_partition); in check_hvb_ops()
138 hvb_return_hvb_err_if_null(ops->valid_rvt_key); in check_hvb_ops()
139 hvb_return_hvb_err_if_null(ops->read_rollback); in check_hvb_ops()
140 hvb_return_hvb_err_if_null(ops->write_rollback); in check_hvb_ops()
141 hvb_return_hvb_err_if_null(ops->read_lock_state); in check_hvb_ops()
142 hvb_return_hvb_err_if_null(ops in check_hvb_ops()
[all...]
/base/startup/hvb/libhvb/src/footer/
H A Dhvb_footer.c65 static enum hvb_errno _load_and_parse_footer(struct hvb_ops *ops, struct hvb_footer *footer, const char *ptn) in _load_and_parse_footer() argument
73 io_ret = ops->read_partition(ops, ptn, -HVB_FOOTER_SIZE, HVB_FOOTER_SIZE, footer_buf.addr, &read_bytes); in _load_and_parse_footer()
93 static enum hvb_errno _load_cert(struct hvb_ops *ops, struct hvb_buf *cert, const char *ptn, struct hvb_footer *footer) in _load_cert() argument
99 io_ret = ops->read_partition(ops, ptn, offset, cert->size, cert->addr, &read_bytes); in _load_cert()
113 enum hvb_errno footer_init_desc(struct hvb_ops *ops, const char *ptn, const char *const *hash_ptn_list, in footer_init_desc() argument
116 hvb_return_hvb_err_if_null(ops); in footer_init_desc()
126 ret = check_hvb_ops(ops); in footer_init_desc()
128 hvb_print("error, check ops\ in footer_init_desc()
[all...]
/base/startup/init/services/param/adapter/
H A Dparam_selinux.c40 const char *libname = (GetParamWorkSpace()->ops.updaterMode == 1) ? CHECKER_UPDATER_LIB : CHECKER_LIB_NAME; in InitSelinuxOpsForInit()
97 PARAM_CHECK(ret == 0, return -1, "Failed to init selinux ops"); in InitLocalSecurityLabel()
120 PARAM_CHECK(GetParamWorkSpace() != NULL && GetParamWorkSpace()->ops.setfilecon != NULL, in SetSelinuxFileCon()
127 if (GetParamWorkSpace()->ops.setfilecon(buffer, context) < 0) { in SetSelinuxFileCon()
262 INIT_LOCAL_API int RegisterSecuritySelinuxOps(ParamSecurityOps *ops, int isInit) in RegisterSecuritySelinuxOps() argument
265 PARAM_CHECK(ops != NULL, return -1, "Invalid param"); in RegisterSecuritySelinuxOps()
266 int ret = PARAM_STRCPY(ops->name, sizeof(ops->name), "selinux"); in RegisterSecuritySelinuxOps()
267 ops->securityGetLabel = NULL; in RegisterSecuritySelinuxOps()
268 ops in RegisterSecuritySelinuxOps()
[all...]
H A Dparam_dac.c284 INIT_LOCAL_API int RegisterSecurityDacOps(ParamSecurityOps *ops, int isInit) in RegisterSecurityDacOps() argument
286 PARAM_CHECK(ops != NULL, return -1, "Invalid param"); in RegisterSecurityDacOps()
288 int ret = PARAM_STRCPY(ops->name, sizeof(ops->name), "dac"); in RegisterSecurityDacOps()
289 ops->securityInitLabel = InitLocalSecurityLabel; in RegisterSecurityDacOps()
290 ops->securityCheckFilePermission = CheckFilePermission; in RegisterSecurityDacOps()
292 ops->securityCheckParamPermission = DacCheckParamPermission; in RegisterSecurityDacOps()
294 ops->securityFreeLabel = FreeLocalSecurityLabel; in RegisterSecurityDacOps()
296 ops->securityGetLabel = DacGetParamSecurityLabel; in RegisterSecurityDacOps()
H A Dparam_persistadp.c307 int RegisterPersistParamOps(PersistParamOps *ops) in RegisterPersistParamOps() argument
310 PARAM_CHECK(ops != NULL, return -1, "Invalid ops"); in RegisterPersistParamOps()
311 ops->save = SavePersistParam; in RegisterPersistParamOps()
312 ops->load = LoadPersistParam; in RegisterPersistParamOps()
313 ops->batchSaveBegin = BatchSavePersistParamBegin; in RegisterPersistParamOps()
314 ops->batchSave = BatchSavePersistParam; in RegisterPersistParamOps()
315 ops->batchSaveEnd = BatchSavePersistParamEnd; in RegisterPersistParamOps()
/base/update/sys_installer/services/module_update/util/src/
H A Dmodule_hvb_ops.cpp68 struct hvb_ops *ops, const char *partition, int64_t offset, uint64_t numBytes, void *buf, uint64_t *outNumRead) in HvbReadFromPartition()
108 struct hvb_ops *ops, const char *partition, int64_t offset, uint64_t numBytes, const void *buf) in HvbWriteToPartition()
113 static enum hvb_io_errno HvbInvalidateKey(struct hvb_ops *ops, const uint8_t *publicKeyData, uint64_t publicKeyLength, in HvbInvalidateKey() argument
126 struct hvb_ops *ops, uint64_t rollBackIndexLocation, uint64_t *outRollbackIndex) in HvbReadRollbackIdx()
139 struct hvb_ops *ops, uint64_t rollBackIndexLocation, uint64_t rollbackIndex) in HvbWriteRollbackIdx()
144 static enum hvb_io_errno HvbReadLockState(struct hvb_ops *ops, bool *lock_state) in HvbReadLockState() argument
149 static enum hvb_io_errno HvbGetSizeOfPartition(struct hvb_ops *ops, const char *partition, uint64_t *size) in HvbGetSizeOfPartition() argument
67 HvbReadFromPartition( struct hvb_ops *ops, const char *partition, int64_t offset, uint64_t numBytes, void *buf, uint64_t *outNumRead) HvbReadFromPartition() argument
107 HvbWriteToPartition( struct hvb_ops *ops, const char *partition, int64_t offset, uint64_t numBytes, const void *buf) HvbWriteToPartition() argument
125 HvbReadRollbackIdx( struct hvb_ops *ops, uint64_t rollBackIndexLocation, uint64_t *outRollbackIndex) HvbReadRollbackIdx() argument
138 HvbWriteRollbackIdx( struct hvb_ops *ops, uint64_t rollBackIndexLocation, uint64_t rollbackIndex) HvbWriteRollbackIdx() argument
/base/startup/init/interfaces/innerkits/fs_manager/libfs_hvb/
H A Dhvb_ops.c68 static enum hvb_io_errno HvbReadFromPartition(struct hvb_ops* ops, in HvbReadFromPartition() argument
79 if (ops == NULL || partition == NULL || in HvbReadFromPartition()
143 static enum hvb_io_errno HvbWriteToPartition(struct hvb_ops* ops, in HvbWriteToPartition() argument
151 static enum hvb_io_errno HvbInvaldateKey(struct hvb_ops* ops, in HvbInvaldateKey() argument
167 static enum hvb_io_errno HvbReadRollbackIdx(struct hvb_ops* ops, in HvbReadRollbackIdx() argument
181 static enum hvb_io_errno HvbWriteRollbackIdx(struct hvb_ops* ops, in HvbWriteRollbackIdx() argument
188 static enum hvb_io_errno HvbReadLockState(struct hvb_ops* ops, in HvbReadLockState() argument
194 static enum hvb_io_errno HvbGetSizeOfPartition(struct hvb_ops* ops, in HvbGetSizeOfPartition() argument
/base/startup/init/services/param/base/
H A Dparam_base.c80 static int CheckNeedInit(int onlyRead, const PARAM_WORKSPACE_OPS *ops) in CheckNeedInit() argument
82 if (ops != NULL) { in CheckNeedInit()
83 g_paramWorkSpace.ops.updaterMode = ops->updaterMode; in CheckNeedInit()
84 if (ops->getServiceGroupIdByPid != NULL) { in CheckNeedInit()
85 g_paramWorkSpace.ops.getServiceGroupIdByPid = ops->getServiceGroupIdByPid; in CheckNeedInit()
87 if (ops->logFunc != NULL) { in CheckNeedInit()
89 g_paramWorkSpace.ops.logFunc = ops in CheckNeedInit()
170 ParamSecurityOps *ops = GetParamSecurityOps(PARAM_SECURITY_SELINUX); CreateWorkSpace() local
185 InitParamWorkSpace(int onlyRead, const PARAM_WORKSPACE_OPS *ops) InitParamWorkSpace() argument
268 PARAM_WORKSPACE_OPS ops = {0}; InitParameterClient() local
[all...]
/base/startup/hvb/libhvb/src/auth/
H A Dhvb.c72 static enum hvb_errno hvb_rvt_verify_root(struct hvb_ops *ops, const char *ptn, in hvb_rvt_verify_root() argument
81 ret = footer_init_desc(ops, ptn, ptn_list, &cert_pubk, vd); in hvb_rvt_verify_root()
87 io_ret = ops->valid_rvt_key(ops, cert_pubk.addr, cert_pubk.size, NULL, 0, &is_trusted); in hvb_rvt_verify_root()
129 static enum hvb_errno hvb_walk_verify_nodes(struct hvb_ops *ops, const char *const *ptn_list, in hvb_walk_verify_nodes() argument
168 ret = footer_init_desc(ops, &desc.name[0], ptn_list, &cert_pubk, vd); in hvb_walk_verify_nodes()
222 enum hvb_errno hvb_chain_verify(struct hvb_ops *ops, in hvb_chain_verify() argument
232 hvb_return_hvb_err_if_null(ops); in hvb_chain_verify()
235 ret = check_hvb_ops(ops); in hvb_chain_verify()
237 hvb_print("error, check ops\ in hvb_chain_verify()
[all...]
/base/startup/hvb/libhvb/src/cmdline/
H A Dhvb_cmdline.c102 enum hvb_errno hvb_creat_cmdline(struct hvb_ops *ops, struct hvb_verified_data *vd) in hvb_creat_cmdline() argument
104 hvb_return_hvb_err_if_null(ops); in hvb_creat_cmdline()
110 ret = check_hvb_ops(ops); in hvb_creat_cmdline()
112 hvb_print("error, check ops\n"); in hvb_creat_cmdline()
124 io_ret = ops->read_lock_state(ops, &device_locked); in hvb_creat_cmdline()
/base/startup/hvb/test/
H A 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/hvb/libhvb/src/cert/
H A Dhvb_cert.c100 static enum hvb_errno hash_image_init_desc(struct hvb_ops *ops, const char *ptn, in hash_image_init_desc() argument
125 io_ret = ops->read_partition(ops, ptn, 0, image_buf.size, image_buf.addr, &read_bytes); in hash_image_init_desc()
475 static enum hvb_errno _check_rollback_index(struct hvb_ops *ops, struct hvb_cert *cert, struct hvb_verified_data *vd) in _check_rollback_index() argument
487 io_ret = ops->read_rollback(ops, rollback_location, &stored_rollback_index); in _check_rollback_index()
503 enum hvb_errno cert_init_desc(struct hvb_ops *ops, const char *ptn, struct hvb_buf *cert_buf, in cert_init_desc() argument
507 hvb_return_hvb_err_if_null(ops); in cert_init_desc()
515 ret = check_hvb_ops(ops); in cert_init_desc()
517 hvb_print("error, check ops\ in cert_init_desc()
[all...]
/base/startup/init/services/param/include/
H A Dparam_security.h112 typedef int (*RegisterSecurityOpsPtr)(ParamSecurityOps *ops, int isInit);
128 INIT_LOCAL_API int RegisterSecuritySelinuxOps(ParamSecurityOps *ops, int isInit);
132 INIT_LOCAL_API int RegisterSecurityDacOps(ParamSecurityOps *ops, int isInit);
/base/telephony/ril_adapter/services/hril_hdf/src/
H A Dhril_hdf.c148 const HRilOps *ops = NULL; in LoadVendor() local
177 ops = rilInitOps(&g_reportOps); in LoadVendor()
178 HRilRegOps(ops); in LoadVendor()
/base/startup/init/services/param/linux/
H A Dparam_service.c389 ParamSecurityOps *ops = GetParamSecurityOps(PARAM_SECURITY_SELINUX); in LoadSelinuxLabel() local
390 if (ops != NULL && ops->securityGetLabel != NULL) { in LoadSelinuxLabel()
391 ops->securityGetLabel(op); in LoadSelinuxLabel()
402 PARAM_WORKSPACE_OPS ops = {0}; in InitParamService() local
403 ops.updaterMode = InUpdaterMode(); in InitParamService()
405 ops.logFunc = InitLog; in InitParamService()
406 ops.getServiceGroupIdByPid = GetServiceGroupIdByPid; in InitParamService()
408 ops.setfilecon = setfilecon; in InitParamService()
410 int ret = InitParamWorkSpace(0, &ops); in InitParamService()
[all...]
H A Dparam_request.c41 PARAM_WORKSPACE_OPS ops = {0}; in ParameterInit() local
42 ops.updaterMode = 0; in ParameterInit()
43 ops.logFunc = InitLog; in ParameterInit()
45 ops.setfilecon = NULL; in ParameterInit()
47 InitParamWorkSpace(1, &ops); in ParameterInit()
/base/startup/init/test/unittest/param/
H A Dselinux_unittest.cpp146 uint8_t updateMode = GetParamWorkSpace()->ops.updaterMode; in TestClientSelinuxCheckParaPermissionRead()
147 GetParamWorkSpace()->ops.updaterMode = 1; // 1 test updater mode in TestClientSelinuxCheckParaPermissionRead()
152 GetParamWorkSpace()->ops.updaterMode = updateMode; in TestClientSelinuxCheckParaPermissionRead()

Completed in 12 milliseconds

12