From 4111f38dd36fe1ca78bb9f264f14e3a83b6a6d36 Mon Sep 17 00:00:00 2001 From: zhuofeng Date: Tue, 12 Mar 2024 14:28:55 +0800 Subject: [PATCH] print logs in the same line Signed-off-by: Mauro Carvalho Chehab --- ras-arm-handler.c | 16 ++++++++-------- ras-non-standard-handler.c | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/ras-arm-handler.c b/ras-arm-handler.c index 0cff842..51f2f3c 100644 --- a/ras-arm-handler.c +++ b/ras-arm-handler.c @@ -180,7 +180,7 @@ int ras_arm_event_handler(struct trace_seq *s, if (tm) strftime(ev.timestamp, sizeof(ev.timestamp), "%Y-%m-%d %H:%M:%S %z", tm); - trace_seq_printf(s, "%s\n", ev.timestamp); + trace_seq_printf(s, "%s", ev.timestamp); if (tep_get_field_val(s, event, "affinity", record, &val, 1) < 0) return -1; @@ -190,27 +190,27 @@ int ras_arm_event_handler(struct trace_seq *s, if (tep_get_field_val(s, event, "mpidr", record, &val, 1) < 0) return -1; ev.mpidr = val; - trace_seq_printf(s, "\n MPIDR: 0x%llx", (unsigned long long)ev.mpidr); + trace_seq_printf(s, " MPIDR: 0x%llx", (unsigned long long)ev.mpidr); if (tep_get_field_val(s, event, "midr", record, &val, 1) < 0) return -1; ev.midr = val; - trace_seq_printf(s, "\n MIDR: 0x%llx", (unsigned long long)ev.midr); + trace_seq_printf(s, " MIDR: 0x%llx", (unsigned long long)ev.midr); if (tep_get_field_val(s, event, "running_state", record, &val, 1) < 0) return -1; ev.running_state = val; - trace_seq_printf(s, "\n running_state: %d", ev.running_state); + trace_seq_printf(s, " running_state: %d", ev.running_state); if (tep_get_field_val(s, event, "psci_state", record, &val, 1) < 0) return -1; ev.psci_state = val; - trace_seq_printf(s, "\n psci_state: %d", ev.psci_state); + trace_seq_printf(s, " psci_state: %d", ev.psci_state); if (tep_get_field_val(s, event, "pei_len", record, &val, 1) < 0) return -1; ev.pei_len = val; - trace_seq_printf(s, "\n ARM Processor Err Info data len: %d\n", + trace_seq_printf(s, " ARM Processor Err Info data len: %d\n", ev.pei_len); ev.pei_error = tep_get_field_raw(s, event, "buf", record, &len, 1); @@ -221,7 +221,7 @@ int ras_arm_event_handler(struct trace_seq *s, if (tep_get_field_val(s, event, "ctx_len", record, &val, 1) < 0) return -1; ev.ctx_len = val; - trace_seq_printf(s, "\n ARM Processor Err Context Info data len: %d\n", + trace_seq_printf(s, " ARM Processor Err Context Info data len: %d\n", ev.ctx_len); ev.ctx_error = tep_get_field_raw(s, event, "buf1", record, &len, 1); @@ -232,7 +232,7 @@ int ras_arm_event_handler(struct trace_seq *s, if (tep_get_field_val(s, event, "oem_len", record, &val, 1) < 0) return -1; ev.oem_len = val; - trace_seq_printf(s, "\n Vendor Specific Err Info data len: %d\n", + trace_seq_printf(s, " Vendor Specific Err Info data len: %d\n", ev.oem_len); ev.vsei_error = tep_get_field_raw(s, event, "buf2", record, &len, 1); diff --git a/ras-non-standard-handler.c b/ras-non-standard-handler.c index f58e6a2..940fd87 100644 --- a/ras-non-standard-handler.c +++ b/ras-non-standard-handler.c @@ -202,8 +202,8 @@ int ras_non_standard_event_handler(struct trace_seq *s, return -1; if (strcmp(uuid_le(ev.sec_type), "e8ed898d-df16-43cc-8ecc-54f060ef157f") == 0) - trace_seq_printf(s, "\n section type: %s", - "Ampere Specific Error\n"); + trace_seq_printf(s, " section type: %s", + "Ampere Specific Error"); else trace_seq_printf(s, " section type: %s", uuid_le(ev.sec_type));