diff options
Diffstat (limited to 'lib/ipmi_sdr.c')
-rw-r--r-- | lib/ipmi_sdr.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/ipmi_sdr.c b/lib/ipmi_sdr.c index 292a7d3..e3122dc 100644 --- a/lib/ipmi_sdr.c +++ b/lib/ipmi_sdr.c @@ -32,6 +32,7 @@ * LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, * EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. */ +#define _BSD_SOURCE #include <string.h> @@ -69,6 +70,10 @@ static struct ipmi_sdr_iterator *sdr_list_itr = NULL; void printf_sdr_usage(); +/* From src/plugins/ipmi_intf.c: */ +uint16_t +ipmi_intf_get_max_response_data_size(struct ipmi_intf * intf); + /* ipmi_sdr_get_unit_string - return units for base/modifier * * @pct: units are a percentage @@ -864,9 +869,11 @@ ipmi_sdr_get_header(struct ipmi_intf *intf, struct ipmi_sdr_iterator *itr) * situation, we cheat and put the original record id back in. * Otherwise, a later Get SDR Record command will fail with * completion code CBh = "Requested Sensor, data, or record - * not present" + * not present". Exception is if 'Record ID' is specified as 0000h. + * For further information see IPMI v2.0 Spec, Section 33.12 */ - if (sdr_rs.id != itr->next) { + if ((itr->next != 0x0000) && + (sdr_rs.id != itr->next)) { lprintf(LOG_DEBUG, "SDR record id mismatch: 0x%04x", sdr_rs.id); sdr_rs.id = itr->next; } |