On 03/26/2012 10:09 PM, Gowda, Srinivas G wrote:
> 
> 
> Thanks,
> G
> srinivas_g_go...@dell.com
> DELL


Rewritten patch using macros.

Thanks,
G
srinivas_g_go...@dell.com
DELL
diff -Naurp 06-ipmitool_opensel_part2_delloem/lib/ipmi_sel.c 
07-ipmitool_opensel_part3_delloem/lib/ipmi_sel.c
--- 06-ipmitool_opensel_part2_delloem/lib/ipmi_sel.c    2012-04-03 
18:05:35.000000000 +0530
+++ 07-ipmitool_opensel_part3_delloem/lib/ipmi_sel.c    2012-04-03 
17:51:37.000000000 +0530
@@ -624,14 +624,80 @@ char * get_dell_evt_desc(struct ipmi_int
                                        {
                                                if(EVT1_OFFSET(data1) == 0x00)
                                                {
+                                                       
if(rec->sel_type.standard_type.sensor_num == 0x1C)
+                                                       {
+                                                               
if(EVT1_OEM2_VALID(data1) && EVT1_OEM3_VALID(data1))
+                                                               {
+                                                                       count = 
0;
+                                                                       
snprintf(desc,SIZE_OF_DESC,"CRC Error on:");
+                                                                       
for(i=0;i<4;i++)
+                                                                       {
+                                                                               
if((BIT(i))&(data2))
+                                                                               
{
+                                                                               
        if(count)
+                                                                               
        {
+                                                                               
                str = desc+strlen(desc);
+                                                                               
                *str++ = ',';
+                                                                               
                 str = '\0';
+                                                                               
count = 0;
+                                                                               
        }
+                                                                               
        switch(i)
+                                                                               
        {
+                                                                               
                case 0: snprintf(tmpdesc,SIZE_OF_DESC,"South Bound Memory");
+                                                                               
                                strcat(desc,tmpdesc);
+                                                                               
                                count++;
+                                                                               
                                break;
+                                                                               
                case 1: snprintf(tmpdesc,SIZE_OF_DESC,"South Bound Config");
+                                                                               
                                strcat(desc,tmpdesc);
+                                                                               
                                count++;
+                                                                               
                                break;
+                                                                               
                case 2: snprintf(tmpdesc,SIZE_OF_DESC,"North Bound memory");
+                                                                               
                                strcat(desc,tmpdesc);
+                                                                               
                                count++;
+                                                                               
                                break;
+                                                                               
                case 3: snprintf(tmpdesc,SIZE_OF_DESC,"North Bound 
memory-corr");
+                                                                               
                                strcat(desc,tmpdesc);
+                                                                               
                                count++;
+                                                                               
                                break;
+                                                                               
                default:
+                                                                               
                                break;
+                                                                               
        }
+                                                                               
}
+                                                                       }
+                                                                       
if(data3>=0x00 && data3<0xFF)
+                                                                       {
+                                                                               
snprintf(tmpdesc,SIZE_OF_DESC,"|Failing_Channel:%d",data3);
+                                                                               
strcat(desc,tmpdesc);
+                                                                       }
+                                                               }
+                                                               break;
+                                                       }
                                                        
snprintf(desc,SIZE_OF_DESC,"Correctable ECC | ");
                                                }
                                                else if(EVT1_OFFSET(data1) == 
0x01) 
                                                {
                                                        
snprintf(desc,SIZE_OF_DESC,"UnCorrectable ECC | ");
                                                }
                                        } 
+                                       else if(code == 0x10)
+                                       {
+                                               if(EVT1_OFFSET(data1) == 0x00) 
+                                                       
snprintf(desc,SIZE_OF_DESC,"Corr Memory Log Dissabled | ");
+                                       }
                                } 
+                               else
+                               {
+                                       if(code == 0x12) 
+                                       {
+                                               if(EVT1_OFFSET(data1) == 0x02) 
+                                                       
snprintf(desc,SIZE_OF_DESC,"Unknown System Hardware Failure ");
+                                       }
+                                       if(code == 0x10)
+                                       {
+                                               if(EVT1_OFFSET(data1) == 0x03) 
+                                                       
snprintf(desc,SIZE_OF_DESC,"All Even Logging Dissabled");
+                                       }
+                               }
                                if(EVT1_OEM2_VALID(data1)) 
                                {
                                        if(((data2 >> 4) != 0x0f) && ((data2 >> 
4) < 0x08))
------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
Ipmitool-devel mailing list
Ipmitool-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ipmitool-devel

Reply via email to