If the offset was greater than 127, then the multi_offset would end
up being a negative value, which is not what we want.

Signed-off-by: Dan Gora <d...@adax.com>
---
 ipmitool/lib/ipmi_ekanalyzer.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/ipmitool/lib/ipmi_ekanalyzer.c b/ipmitool/lib/ipmi_ekanalyzer.c
index 6529dd8..2da4650 100644
--- a/ipmitool/lib/ipmi_ekanalyzer.c
+++ b/ipmitool/lib/ipmi_ekanalyzer.c
@@ -3940,9 +3940,9 @@ ipmi_ekanalyzer_fru_file2structure( char * filename,
       struct ipmi_ek_multi_header ** list_last )
 {
        FILE * input_file;
-       char data;
+       unsigned char data;
        unsigned char last_record = 0;
-       int multi_offset;
+       unsigned int multi_offset;
        int record_count = 0;
 
        input_file = fopen ( filename, "r");
@@ -3987,9 +3987,10 @@ ipmi_ekanalyzer_fru_file2structure( char * filename,
                               (*list_record)->header.len);
                if ( verbose > 1 ) {
                        int i;
-                       printf("%02x\t", (*list_record)->header.type);
+                       printf("Type: %02x\t", (*list_record)->header.type);
                        for ( i = 0; i < ( (*list_record)->header.len ); i++ ){
-                               printf("%02x\t", (*list_record)->data[i]);
+                               printf("0x%04x: %02x\t", 
+                                       i, (*list_record)->data[i]);
                        }
                        printf("\n");
                }
-- 
1.7.7


------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________
Ipmitool-devel mailing list
Ipmitool-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ipmitool-devel

Reply via email to