commit d3d336471119f16368e40b68643d9dd928be5385
Author: Luck, Tony <tony.luck@intel.com>
Date: Mon Apr 7 12:23:25 2014 -0700
rasdaemon: fix some typos and cut/paste errors in sqlite bits
aer event has the error_type as field 2 and msg as field 3 - but the calls
the sqlite3_bind_text use 3 and 4.
mce event forgot to declare the "mcastatus_msg"
Signed-off-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
diff --git a/ras-record.c b/ras-record.c
index daa3cb1..e602edb 100644
--- a/ras-record.c
+++ b/ras-record.c
@@ -139,8 +139,8 @@ int ras_store_aer_event(struct ras_events *ras, struct ras_aer_event *ev)
log(TERM, LOG_INFO, "aer_event store: %p\n", priv->stmt_aer_event);
sqlite3_bind_text(priv->stmt_aer_event, 1, ev->timestamp, -1, NULL);
- sqlite3_bind_text(priv->stmt_aer_event, 3, ev->error_type, -1, NULL);
- sqlite3_bind_text(priv->stmt_aer_event, 4, ev->msg, -1, NULL);
+ sqlite3_bind_text(priv->stmt_aer_event, 2, ev->error_type, -1, NULL);
+ sqlite3_bind_text(priv->stmt_aer_event, 3, ev->msg, -1, NULL);
rc = sqlite3_step(priv->stmt_aer_event);
if (rc != SQLITE_OK && rc != SQLITE_DONE)
@@ -189,6 +189,7 @@ static const struct db_fields mce_record_fields[] = {
{ .name="error_msg", .type="TEXT" },
{ .name="mcgstatus_msg", .type="TEXT" },
{ .name="mcistatus_msg", .type="TEXT" }, // 20
+ { .name="mcastatus_msg", .type="TEXT" },
{ .name="user_action", .type="TEXT" },
{ .name="mc_location", .type="TEXT" },
};