更新日期: 2022/06/01 来源: https://gitee.com/weharmony/kernel_liteos_a_note
los_blackbox_system_adapter.h 文件参考

浏览源代码.

函数

int OsBBoxSystemAdapterInit (void)
 

函数说明

◆ OsBBoxSystemAdapterInit()

int OsBBoxSystemAdapterInit ( void  )

在文件 los_blackbox_system_adapter.c237 行定义.

238{
239 struct ModuleOps ops = {
240 .module = MODULE_SYSTEM,
241 .Dump = Dump,
242 .Reset = Reset,
243 .GetLastLogInfo = GetLastLogInfo,
244 .SaveLastLog = SaveLastLog,
245 };
246
247 /* allocate buffer for kmsg */
248 if (AllocLogBuffer() == 0) {
250 if (BBoxRegisterModuleOps(&ops) != 0) {
251 BBOX_PRINT_ERR("BBoxRegisterModuleOps failed!\n");
252 g_logBuffer = NULL;
253 return LOS_NOK;
254 }
255 } else {
256 BBOX_PRINT_ERR("AllocLogBuffer failed!\n");
257 }
258
259#ifdef LOSCFG_BLACKBOX_TEST
260 BBoxTest();
261#endif
262
263 return LOS_OK;
264}
int BBoxRegisterModuleOps(struct ModuleOps *ops)
static int SaveLastLog(const char *logDir, struct ErrorInfo *info)
static int AllocLogBuffer(void)
static char * g_logBuffer
static void BBoxTest(void)
static void Reset(struct ErrorInfo *info)
static void Dump(const char *logDir, struct ErrorInfo *info)
static int GetLastLogInfo(struct ErrorInfo *info)
static void RegisterExcInfoHook(void)
char module[MODULE_MAX_LEN]
Definition: los_blackbox.h:68
函数调用图: