mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-12 12:30:08 +00:00
tools: acrn-crashlog: main thread of acrn-crashlog/acrnprobe
This patch implements the main thread of acrnprobe. As a log collection mechanism to record critical events on the platform, acrnprobe provides the following features: 1. detect event. 2. analyze event and determine the event type. 3. collect information for the detected events. 4. archive these information as logs, and generate records. Signed-off-by: Liu Xinwu <xinwu.liu@intel.com> Reviewed-by: Zhang Yanmin <yanmin.zhang@intel.com> Reviewed-by: Liu Chuansheng <chuansheng.liu@intel.com> Reviewed-by: Zhao Yakui <yakui.zhao@intel.com> Reviewed-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com> Acked-by: Eddie Dong <Eddie.dong@intel.com>
This commit is contained in:
37
tools/acrn-crashlog/acrnprobe/include/load_conf.h
Normal file
37
tools/acrn-crashlog/acrnprobe/include/load_conf.h
Normal file
@@ -0,0 +1,37 @@
|
||||
/*
|
||||
* Copyright (C) 2018 Intel Corporation
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
||||
#ifndef __LOAD_CONF_H__
|
||||
#define __LOAD_CONF_H__
|
||||
|
||||
#define SENDER_MAX 3
|
||||
|
||||
struct uptime_t {
|
||||
char *name;
|
||||
char *frequency;
|
||||
char *eventhours;
|
||||
|
||||
int wd;
|
||||
char *path;
|
||||
};
|
||||
|
||||
struct sender_t {
|
||||
struct uptime_t *uptime;
|
||||
};
|
||||
|
||||
struct conf_t {
|
||||
struct sender_t *sender[SENDER_MAX];
|
||||
};
|
||||
|
||||
struct conf_t conf;
|
||||
|
||||
#define for_each_sender(id, sender, conf) \
|
||||
for (id = 0, sender = conf.sender[0]; \
|
||||
id < SENDER_MAX; \
|
||||
id++, sender = conf.sender[id])
|
||||
|
||||
int load_conf(char *path);
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user