Blame SOURCES/0036-rasdaemon-fix-some-errors-in-sqlite.patch

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