]> www.infradead.org Git - users/mchehab/rasdaemon.git/commitdiff
rasdaemon: fix some typos and cut/paste errors in sqlite bits
authorLuck, Tony <tony.luck@intel.com>
Mon, 7 Apr 2014 19:23:25 +0000 (12:23 -0700)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Thu, 26 Jun 2014 12:23:49 +0000 (09:23 -0300)
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>
ras-record.c

index daa3cb1028836c868d96371ec18f0b52e9968da1..e602edb5d35507bc9c48e5542df947eeed2b0f67 100644 (file)
@@ -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" },
 };