From: John B. <jd...@us...> - 2006-07-28 20:43:54
|
Update of /cvsroot/ipmitool/ipmitool/include/ipmitool In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv15090 Modified Files: ipmi_sdr.h Log Message: There is a bug in ipmi_sdr.h which prevents ipmitool from correctly displaying thresholds and threshold mask. The "Discrete reading mask/Settable threshold mask, Readable threshold mask" field in SDR has two bytes (16 bits). The 16 bits should be treated as one uint16_t instead of two bytes. Otherwise, if someone sets the fields to 0x3f, it will be mistakenly interpreted as 0x3f00 instead of 0x003f. Index: ipmi_sdr.h =================================================================== RCS file: /cvsroot/ipmitool/ipmitool/include/ipmitool/ipmi_sdr.h,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** ipmi_sdr.h 12 May 2006 14:07:31 -0000 1.35 --- ipmi_sdr.h 28 Jul 2006 20:43:50 -0000 1.36 *************** *** 160,164 **** uint16_t assert_event; /* assertion event mask */ uint16_t deassert_event; /* de-assertion event mask */ ! uint16_t read; /* discrete reaading mask */ } discrete; struct { --- 160,164 ---- uint16_t assert_event; /* assertion event mask */ uint16_t deassert_event; /* de-assertion event mask */ ! uint16_t read; /* discrete reading mask */ } discrete; struct { *************** *** 233,274 **** uint16_t reserved_2:1; #endif ! struct { ! #if WORDS_BIGENDIAN /* settable threshold mask */ ! uint8_t reserved:2; ! uint8_t unr:1; ! uint8_t ucr:1; ! uint8_t unc:1; ! uint8_t lnr:1; ! uint8_t lcr:1; ! uint8_t lnc:1; #else ! uint8_t lnc:1; ! uint8_t lcr:1; ! uint8_t lnr:1; ! uint8_t unc:1; ! uint8_t ucr:1; ! uint8_t unr:1; ! uint8_t reserved:2; #endif ! } set; ! struct { ! #if WORDS_BIGENDIAN /* readable threshold mask */ ! uint8_t reserved:2; ! uint8_t unr:1; ! uint8_t ucr:1; ! uint8_t unc:1; ! uint8_t lnr:1; ! uint8_t lcr:1; ! uint8_t lnc:1; #else ! uint8_t lnc:1; ! uint8_t lcr:1; ! uint8_t lnr:1; ! uint8_t unc:1; ! uint8_t ucr:1; ! uint8_t unr:1; ! uint8_t reserved:2; #endif ! } read; } threshold; } type; --- 233,282 ---- uint16_t reserved_2:1; #endif ! union { ! struct { ! #if WORDS_BIGENDIAN /* settable threshold mask */ ! uint16_t reserved:2; ! uint16_t unr:1; ! uint16_t ucr:1; ! uint16_t unc:1; ! uint16_t lnr:1; ! uint16_t lcr:1; ! uint16_t lnc:1; ! /* padding lower 8 bits */ ! uint16_t readable:8; #else ! uint16_t readable:8; ! uint16_t lnc:1; ! uint16_t lcr:1; ! uint16_t lnr:1; ! uint16_t unc:1; ! uint16_t ucr:1; ! uint16_t unr:1; ! uint16_t reserved:2; #endif ! } set; ! struct { ! #if WORDS_BIGENDIAN /* readable threshold mask */ ! /* padding upper 8 bits */ ! uint16_t settable:8; ! uint16_t reserved:2; ! uint16_t unr:1; ! uint16_t ucr:1; ! uint16_t unc:1; ! uint16_t lnr:1; ! uint16_t lcr:1; ! uint16_t lnc:1; #else ! uint16_t lnc:1; ! uint16_t lcr:1; ! uint16_t lnr:1; ! uint16_t unc:1; ! uint16_t ucr:1; ! uint16_t unr:1; ! uint16_t reserved:2; ! uint16_t settable:8; #endif ! } read; ! }; } threshold; } type; |