Hi guys

A bit confuse when read the procedure read_fru_area code in ipmi_fru.c

Both offset and the "count returned" will be adjusted to word and byte 
according to the fru->access

<SNIP>
tmp = fru->access ? off >> 1 : off;
                   msg_data[0] = id;
                   msg_data[1] = (uint8_t)(tmp & 0xff);
                   msg_data[2] = (uint8_t)(tmp >> 8);
        ... ...
        tmp = fru->access ? rsp->data[0] << 1 : rsp->data[0];
                   memcpy((frubuf + off), rsp->data + 1, tmp);
</SNIP>

Why the Count to read didn't to do the same adjust based on fru->access? I 
think it should have the same logic like

<SNIP>
tmp = finish - off;

if (tmp > fru_data_rqst_size)
   tmp = fru_data_rqst_size;

if (fru->access)             //Added
tmp >>= 1;             // Added

            msg_data[3] = (uint8_t)tmp;
</SNIP>

Regards
--Jinxin

------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
_______________________________________________
Ipmitool-devel mailing list
Ipmitool-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ipmitool-devel

Reply via email to