// Get the last post code of the given slot int pal_post_get_last(uint8_t slot, uint8_t *status) { int ret; uint8_t buf[MAX_IPMB_RES_LEN] = {0x0}; uint8_t len; int i; ret = bic_get_post_buf(slot, buf, &len); if (ret) { return ret; } // The post buffer is LIFO and the first byte gives the latest post code *status = buf[0]; return 0; }
// Test to get the POST buffer static void util_get_post_buf(uint8_t slot_id) { int ret; uint8_t buf[MAX_IPMB_RES_LEN] = {0x0}; uint8_t len; int i; ret = bic_get_post_buf(slot_id, buf, &len); if (ret) { printf("util_get_post_buf: bic_get_post_buf returns %d\n", ret); return; } printf("util_get_post_buf: returns %d bytes\n", len); for (i = 0; i < len; i++) { printf("0x%X:", buf[i]); } printf("\n"); }