@@ -97,26 +97,32 @@ int ras_diskerror_event_handler(struct trace_seq *s,
dev = (dev_t)val;
if (asprintf(&ev.dev, "%u:%u", major(dev), minor(dev)) < 0)
return -1;
+ trace_seq_printf(s, "%s ", ev.dev);
+
+ ev.rwbs = pevent_get_field_raw(s, event, "rwbs", record, &len, 1);
+ if (!ev.rwbs)
+ return -1;
+ trace_seq_printf(s, "%s ", ev.rwbs);
+
+ ev.cmd = pevent_get_field_raw(s, event, "cmd", record, &len, 1);
+ if (!ev.cmd)
+ return -1;
+ trace_seq_printf(s, "(%s) ", ev.cmd);
if (pevent_get_field_val(s, event, "sector", record, &val, 1) < 0)
return -1;
ev.sector = val;
+ trace_seq_printf(s, "%llu ", ev.sector);
if (pevent_get_field_val(s, event, "nr_sector", record, &val, 1) < 0)
return -1;
ev.nr_sector = (unsigned int)val;
+ trace_seq_printf(s, "+ %u ", ev.nr_sector);
if (pevent_get_field_val(s, event, "error", record, &val, 1) < 0)
return -1;
ev.error = get_blk_error((int)val);
-
- ev.rwbs = pevent_get_field_raw(s, event, "rwbs", record, &len, 1);
- if (!ev.rwbs)
- return -1;
-
- ev.cmd = pevent_get_field_raw(s, event, "cmd", record, &len, 1);
- if (!ev.cmd)
- return -1;
+ trace_seq_printf(s, "[%s]", ev.error);
/* Insert data into the SGBD */
#ifdef HAVE_SQLITE3