Lines Matching refs:ops
41 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()
178 BBOX_PRINT_INFO("[%s] ends saving log!\n", ops->ops.module); in SaveErrorLog()
200 temp->ops.module, temp->ops.Dump, temp->ops.Reset, in PrintModuleOps()
201 temp->ops.GetLastLogInfo, temp->ops.SaveLastLog); in PrintModuleOps()
206 int BBoxRegisterModuleOps(struct ModuleOps *ops) in BBoxRegisterModuleOps() argument
211 if (ops == NULL) { in BBoxRegisterModuleOps()
212 BBOX_PRINT_ERR("ops: %p!\n", ops); in BBoxRegisterModuleOps()
223 (void)memcpy_s(&newOps->ops, sizeof(newOps->ops), ops, sizeof(*ops)); in BBoxRegisterModuleOps()
233 if (strcmp(temp->ops.module, ops->module) == 0) { in BBoxRegisterModuleOps()
234 BBOX_PRINT_ERR("[%s] has been registered!\n", ops->module); in BBoxRegisterModuleOps()
242 BBOX_PRINT_INFO("[%s] is registered successfully!\n", ops->module); in BBoxRegisterModuleOps()
258 struct BBoxOps *ops = NULL; in BBoxNotifyError() local
277 UTILS_DL_LIST_FOR_EACH_ENTRY(ops, &g_opsList, struct BBoxOps, opsList) { in BBoxNotifyError()
278 if (ops == NULL) { in BBoxNotifyError()
279 BBOX_PRINT_ERR("ops: %p!\n", ops); in BBoxNotifyError()
282 if (strcmp(ops->ops.module, module) != 0) { in BBoxNotifyError()
286 if (ops->ops.Dump == NULL && ops->ops.Reset == NULL) { in BBoxNotifyError()
290 if (ops->ops.Dump != NULL) { in BBoxNotifyError()
291 BBOX_PRINT_INFO("[%s] starts dumping data!\n", ops->ops.module); in BBoxNotifyError()
292 ops->ops.Dump(dirName, info); in BBoxNotifyError()
293 BBOX_PRINT_INFO("[%s] ends dumping data!\n", ops->ops.module); in BBoxNotifyError()
295 if (ops->ops.Reset != NULL) { in BBoxNotifyError()
296 BBOX_PRINT_INFO("[%s] starts resetting!\n", ops->ops.module); in BBoxNotifyError()
297 ops->ops.Reset(info); in BBoxNotifyError()
298 BBOX_PRINT_INFO("[%s] ends resetting!\n", ops->ops.module); in BBoxNotifyError()