[COMMON] lib: libdss: Convert trash value to 0
authorYoungwan Kim <y103.kim@samsung.com>
Thu, 12 Jul 2018 02:12:31 +0000 (11:12 +0900)
committerSunyoung Kang <sy0816.kang@samsung.com>
Mon, 23 Jul 2018 08:04:52 +0000 (17:04 +0900)
Change-Id: I754532fc2f404dca8504fa7c81ad22692e704ae6
Signed-off-by: Youngwan Kim <y103.kim@samsung.com>
lib/libdss.c

index 0ad6104e3f1f982397c0c343903c9d923354e43f..9991c0a798a2bb5f60ad81ba40e098f9191feeaf 100644 (file)
@@ -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);