On Fri, Mar 22, 2013 at 1:17 AM, Dan Gora <d...@adax.com> wrote: > If the offset was greater than 127, then the multi_offset would end > up being a negative value, which is not what we want. >
Dan, I actually don't understand this patch. Please, can you dumb it down for me? Also, given your description, I actually don't think problem has been fixed. Shouldn't there, somewhere, be a check whether offset is less than 127? Because what you've described is integer *flow going on. Regards, Z. > 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 ------------------------------------------------------------------------------ Own the Future-Intel® Level Up Game Demo Contest 2013 Rise to greatness in Intel's independent game demo contest. Compete for recognition, cash, and the chance to get your game on Steam. $5K grand prize plus 10 genre and skill prizes. Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d _______________________________________________ Ipmitool-devel mailing list Ipmitool-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ipmitool-devel