mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-06-09 02:24:45 +00:00
tools: acrn-crashlog: refine the configuration structure
1. get string size when parsing configuration. 2. add 'const' for strings got from configuration. Tracked-On: #1254 Signed-off-by: Liu, Xinwu <xinwu.liu@intel.com> Reviewed-by: Yonghua Huang <yonghua.huang@intel.com> Acked-by: Chen Gang <gang.c.chen@intel.com>
This commit is contained in:
@@ -40,12 +40,12 @@
|
||||
"#EVENT ID DATE TYPE\n"
|
||||
|
||||
struct history_entry {
|
||||
char *event;
|
||||
char *type;
|
||||
char *log;
|
||||
const char *event;
|
||||
const char *type;
|
||||
const char *log;
|
||||
const char *lastuptime; /* for uptime */
|
||||
char *key;
|
||||
char *eventtime;
|
||||
const char *key;
|
||||
const char *eventtime;
|
||||
};
|
||||
|
||||
char *history_file;
|
||||
@@ -115,8 +115,8 @@ free:
|
||||
free(des);
|
||||
}
|
||||
|
||||
void hist_raise_event(char *event, char *type, char *log, char *lastuptime,
|
||||
char *key)
|
||||
void hist_raise_event(const char *event, const char *type, const char *log,
|
||||
const char *lastuptime, const char *key)
|
||||
{
|
||||
char line[MAXLINESIZE];
|
||||
char eventtime[LONG_TIME_SIZE];
|
||||
|
||||
Reference in New Issue
Block a user