Skip to content

Commit

Permalink
print logs in the same line
Browse files Browse the repository at this point in the history
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
  • Loading branch information
zhuofeng authored and mchehab committed Jun 11, 2024
1 parent aee13f7 commit 4111f38
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
16 changes: 8 additions & 8 deletions ras-arm-handler.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
Expand All @@ -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);
Expand All @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions ras-non-standard-handler.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit 4111f38

Please sign in to comment.