mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-06-09 10:36:03 +00:00
tools:acrn-crashlog: Change the algorithm of generating event key
Acrnprobe is using SHA to generate ids for events. These ids are only used to index events, not for cryptographic purpose. This patch unify the generating algorithm of short and long ids to SHA256. Tracked-On: #1024 Signed-off-by: Liu, Xinwu <xinwu.liu@intel.com> Reviewed-by: Zhi Jin <zhi.jin@intel.com> Acked-by: Chen Gang <gang.c.chen@intel.com>
This commit is contained in:
@@ -192,7 +192,8 @@ void hist_raise_uptime(char *lastuptime)
|
||||
if (hours / uptime_hours >= loop_uptime_event) {
|
||||
loop_uptime_event = (hours / uptime_hours) + 1;
|
||||
|
||||
key = generate_event_id(uptime->name, "");
|
||||
key = generate_event_id((const char *)uptime->name,
|
||||
NULL, KEY_SHORT);
|
||||
if (key == NULL) {
|
||||
LOGE("generate event id failed, error (%s)\n",
|
||||
strerror(errno));
|
||||
@@ -210,7 +211,7 @@ void hist_raise_infoerror(char *type)
|
||||
{
|
||||
char *key;
|
||||
|
||||
key = generate_event_id("ERROR", type);
|
||||
key = generate_event_id("ERROR", (const char *)type, KEY_SHORT);
|
||||
if (key == NULL) {
|
||||
LOGE("generate event id failed, error (%s)\n",
|
||||
strerror(errno));
|
||||
|
||||
Reference in New Issue
Block a user