From 7dc8c7ac8c7259fd8f963e0344bada3109fb3eef Mon Sep 17 00:00:00 2001 From: Youngwan Kim Date: Thu, 12 Jul 2018 11:12:31 +0900 Subject: [PATCH] [COMMON] lib: libdss: Convert trash value to 0 Change-Id: I754532fc2f404dca8504fa7c81ad22692e704ae6 Signed-off-by: Youngwan Kim --- lib/libdss.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/libdss.c b/lib/libdss.c index 0ad6104e3f1f..9991c0a798a2 100644 --- a/lib/libdss.c +++ b/lib/libdss.c @@ -97,7 +97,12 @@ int main(int argc, char *argv[]) #endif #ifdef CONFIG_DEBUG_SNAPSHOT_ACPM for (i = 0; i < DSS_LOG_MAX_NUM; i++) { - printf("log.append({'time':%.9f, 'type' : 'acpmlog', 'log' : '%s', 'value' : %d })\n", + for (j = 0; j < 8; j++) { + if (!((p->acpm[i].log[j] >= 'a' && p->acpm[i].log[j] <= 'z') || p->acpm[i].log[j] == '_')) + p->acpm[i].log[j] = 0; + } + printf("log.append({'time':%.9f, 'acpm_time':%.9f, 'type' : 'acpmlog', 'log' : '%s', 'value' : %d })\n", + p->acpm[i].time/1.0e9, p->acpm[i].acpm_time/1.0e9, p->acpm[i].log, p->acpm[i].data); -- 2.20.1