]> www.infradead.org Git - users/mchehab/rasdaemon.git/commitdiff
rasdaemon: properly pring message strings in decode_bitfield()
authorSeiichi Ikarashi <s.ikarashi@jp.fujitsu.com>
Tue, 26 May 2015 14:59:36 +0000 (11:59 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Wed, 3 Jun 2015 13:39:15 +0000 (10:39 -0300)
Fix decode_bitfield() so that it does print message strings from the struct
field table.

Signed-off-by: Seiichi Ikarashi <s.ikarashi@jp.fujitsu.com>
Signed-off-by: Aristeu Rozanski <aris@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
bitfield.c

index 1dda30d1085f8fee43cb5881cadf64c3e840df19..d6931c901470c49fb0324680737c80d18fa80b09 100644 (file)
@@ -84,7 +84,8 @@ void decode_bitfield(struct mce_event *e, uint64_t status,
                                continue;
                        mce_snprintf(e->error_msg, "<%u:%llx>",
                                     f->start_bit, (long long)v);
-               }
+               } else
+                       mce_snprintf(e->error_msg, "%s", s);
        }
 }