openhpi2 / Open-HPI

Open HPI is an open source implementation of the SA Forum's Hardware Platform Interface (HPI). HPI provides an abstracted interface to managing computer hardware, typically for chassis and rack based servers
Other
3 stars 1 forks source link

oa_soap_get_hotswap_state() should check SAHPI_CAPABILITY_FRU #2580

Closed openhpi2 closed 8 years ago

openhpi2 commented 9 years ago

s per as the changes made in he HPI B.03.01 Specification(section 7.9.13 page 238), the existing code in oa_soap_get_hotswap_state() at plugins/oa_soap/oa_soap_hotswap.c:

if (! (rpt->ResourceCapabilities & SAHPI_CAPABILITY_MANAGED_HOTSWAP)) { err("Resource does not have MANAGED_HOTSWAP capability"); return SA_ERR_HPI_CAPABILITY; }

Should be modified to

    if (! (rpt->ResourceCapabilities & SAHPI_CAPABILITY_FRU)) {
            err("Resource does not have SAHPI_CAPABILITY_FRU");
            return SA_ERR_HPI_CAPABILITY;
    }

For more details please refer bug #1487.

Reported by: openhpi2

openhpi2 commented 9 years ago

Original comment by: dr_mohan

openhpi2 commented 9 years ago

Fixed in checkin #7635

Original comment by: dr_mohan