HPI General FAQ - General QuestionsClarifications on SA_ERR_HPI_UNKNOWN and SA_ERR_HPI_ERROR
Answer: SA_ERR_HPI_UNKNOWN is to be used in only one case, which is where an HPI Implementation can't figure out what the appropriate ResourceId should be for the saHpiResourceIdGet() function call. See the HPI spec, table 1, in the description for SA_ERR_HPI_UNKNOWN: "The HPI implementation cannot determine an appropriate response. Only used with saHpiResourceIdGet()." SA_ERR_HPI_ERROR is to be used when an HPI Implementation can't manage to apply one of the other error codes. It can be returned from any HPI function call. It is basically the catchall of HPI error codes. Error Return Codes for saHpiSessionClose and saHpiDiscover
Answer: It is true that there are no error return codes listed (only SA_OK) in these function descriptions. That's because table 2 of the HPI spec defines generic error return codes that apply to all of the HPI functions. And the spec developers couldn't come up with any error conditions for saHpiSessionClose() and saHpiDiscover() that weren't already covered by the entries in Table 2. These generic error return codes have been placed in a table at the front, instead of within each function's description. This was done to keep down the volume and repetition. |